SST 2018 Prelim P1 Solution
Uploaded by IDKWHYBUTIAM · 3 November 2024
Preview
1 2018 SEC 4 COMPUTING PRELIM PAPER 1 MARKING SCHEMES Qn 1 Marking Scheme / Answer Marks (i) A byte is a unit of data (or memory) that is made up of eight bits. 1 (ii) A gibibyte = 1024 mebibytes = (1024)2 kibibytes = (1024)3 bytes. = 230 bytes. Hence x = 30. 1 (iii) 256 000 000 000 bytes = 256 GB 4 TB = 4 000 000 000 000 bytes or 4×1012 bytes 1 1 Qn 2 Marking Scheme / Answer Marks (i) Dave is wrong. A 64-bit computer can theoretically access 264 bytes of memory, which is about 18 exibytes; a 32-bit one can access only 232 bytes, which is about 4 gibibytes. 2 (ii) (A) A modern computer is likely to have 8 gigabytes of RAM installed. 1 Qn 3 Marking Scheme / Answer Marks (a) (2E7)16 = (2 x 16^2) + (14 x 16) + (7 x 1) = 743 2 (b) (10 1011 1101 0000 0100)2 = (2BD04)16 2 (c) (3172)10 = (C64)16 2 Qn 4 Marking Scheme / Answer Marks (i) Possible quantities • Number of friends • Hourly rental fee for the karaoke room, in Singapore dollar • Service charge in percentage • Government tax in percentage 2 (ii) Input Output hours : number of hours spent, rounded up to smallest integer greater or equal to itself. FnB: Amount, in Singapore dollars (SGD), spent on food and beverages. N: Number of friends F: Hourly rental fee for the karaoke room, in Singapore dollar. Cost_per_pax : Amount of money, in Singapore dollars (SGD), to be paid by each friend. 3 (iii) Sample modified pseudo-code: INPUT hours, x, N, F Cost_per_pax = (F*hours + (x × 1.07 × 1.1) ) / N OUTPUT Cost_per_pax 2 Qn 5 Marking Scheme / Answer Marks (i) 3 (ii) 1 repeat 3 (step) 2 repeat 4 (left step left repeat 4(step left) right step) right 2 Qn 6 Marking Scheme / Answer Marks (i) 6 1 (ii) “I love it!” 3 (iii) 2 1 (iv) The output represents the number of words in the list words that has more than 2 vowels. 1
2 Qn 7 Marking Scheme / Answer Marks (a) N = 1 L i Output [7] 0 [7] 1 (b) N = 2 L i j Output [5, 3] 0 0 [3, 5] 1 1 [3, 5] 2 (c) N = 4 L i j Output [7, 1, 5, 3] 0 0 [1, 7, 5, 3] 1 [1, 5, 7, 3] 2 [1, 5, 3, 7] 3 1 0 1 [1, 3, 5, 7] 2 2 0 1 3 0 [1, 3, 5, 7] 3 (d) It sorts a given list of number in ascending order. 1 Qn 8 Marking Scheme / Answer Marks 1 highest = 0 Error 1: Line 4 Type: run-time error Correction: number = int(input("Enter a number:")) Error 2: Line 5 Type: syntax error Correction: if number > highest: Error 3: Line 6, 8 Type: Logic error Correction: highest = number, lowest = number 2 lowest = 0 3 for i in range(100): 4 number = input("Enter a number:") 5 if number > highest 6 number = highest 7 if number < lowest: 8 number = lowest 9 print(highest, lowest) 2 2 2
3 Qn 9 Marking Scheme / Answer Marks Code Snippet Types of Validation Check not year.isnumeric() Range Check len(year)!=4 Format Check len(year)==0 Presence Check if (year<0 or y
Content continues in the PDF.
Related notes
- Computing o level notes Notes/Practices · 2023
- BVSS Prelim P1 MSExam Papers · 2024
- BVSS Prelim P1 CPExam Papers · 2024
- CWSS Prelim P1 CPExam Papers · 2024
- CWSS Prelim P1 MSExam Papers · 2024
- computing notesNotes/Practices

