SST 2018 Prelim P1
Uploaded by IDKWHYBUTIAM · 3 November 2024
Preview
Text from the first pagesSECONDARY 4 PRELIMINARY EXAMINATION COMPUTING Paper 1 Written 7155/01 29 August 2018 (Wednesday) 2 hours CANDIDATE NAME CLASS INDEX NUMBER READ THESE INSTRUCTIONS FIRST Do not turn over the page until you are told to do so. Write your name, class, and index number in the spaces provided above. Write in dark blue or black pen. You may use a pencil for any diagrams. Do not use staples, paper clips, highlighters, glue or correction fluid/tape. Approved calculators are allowed. Answer all questions. The number of marks is given in brackets [ ] at the end of each question or part question. You should show all your working. The total number of marks for this paper is 80. This document consists of 18 printed pages. For Examiner’s Use 1 4 2 3 3 6 4 7 5 5 6 6 7 7 8 6 9 3 10 2 11 3 12 4 13 9 14 7 15 4 16 4 Total /80
Page 2 of 18 1 Computer data are represented as bytes. (i) Describe what is meant by a byte and how it is related to a bit. [1] (ii) The number of bytes in a gibibyte can be written as 2x. What is the value of x? [1] (iii) Convert the following amounts of data in the unit. 256 000 000 000 B (bytes) = _________________________ GB (gigabytes). 4 TB = ___________________________________B (bytes). [1] [1] 2 The terms 32-bit and 64-bit refer to the way a computer's central processing unit (CPU) handles memory addresses. Using byte-addressing, the processor can access one byte for each of the possible permutation of the 32 or 64 bits. (i) Dave thinks that a 64-bit computer handles twice as much random-access memory (RAM) than a 32-bit computer. State if Dave is correct. Explain. [2] (ii) A modern computer is likely to have 8 ____________ of RAM installed. (A) gigabytes (B) megabytes (C) kilobytes (D) bytes Choose the correct option: ________________ [1]
Page 3 of 18 [Turn over 3(a) Convert the hexadecimal number (2E7)16 to denary. Answer: _________________________________ [2] 3(b) Convert the binary number (10 1011 1101 0000 0100)2 to hexadecimal. Answer: _________________________________ [2] 3(c) Convert the denary number (3172)10 to hexadecimal. Answer: _________________________________ [2] 4 Study the following problem: A group of five friends booked a karaoke room for an evening and wanted to split the total bill equally among them. The rental fee for the room is $25 nett per hour and they spent $x on food and beverages (F&B). The cost on F&B is subjected to a service charge of 10% and a Goods and Services (GST) tax of 7%. A suggested input and output specification are included in the table below. Input Output hours : number of hours spent, rounded up to smallest integer greater or equal to itself. x: Amount, in Singapore dollars (SGD), spent on food and beverages. Cost_per_pax : Amount of money, in Singapore dollars (SGD), to be paid by each of the five friends. The following is a pseudo-code of an algorithm to solve the problem. INPUT hours, x Cost_per_pax = (25*hours + (x × 1.07 × 1.1) ) / 5 OUTPUT Cost_per_pax
Page 4 of 18 4(i) State two quantities, with proper units when applicable, that can be generalised for the given problem. (1) (2) [2] 4(ii) Modify the input-output specification table for your problem by generalising the two stated quantities. Update the output specification based on the modifications. Input Output hours : number of hours spent, rounded up to smallest integer greater or equal to itself. x: Amount, in Singapore dollars (SGD), spent on food and beverages. Cost_per_pax : [3] 4(iii) Rewrite the pseudo-code for the generalised problem. [2]
Page 5 of 18 [Turn over 5 In a drawing program, a programmer can use the following commands: • step draws a line of length one unit • repeat N repeats the commands between the following brackets N times • left turns 90o to the left • right turns 90o to the right Any program will start with the cursor pointing upward. (i) Dylan wrote the following line of code using the program: step step repeat 4 ( left repeat 4 ( step right ) ) Draw the resultant shape, with an arrow indicating where the pointer is and which direction it is facing. See part (ii) for samples of shape that shows ending position and direction of pointer. [3]
Page 6 of 18 5(ii) Keon wants to write a program to produce the following shape. The program he writes goes like this: 1 repeat 3 (step) 2 repeat 4 (left step left repeat 4(step left) right step) However, the program has a bug. It produces the following shape: Identify, by underlining below, the command where the first error occurs. Fix the bug by modifying, removing or adding just one command. Write the fix in the space below the code. 1 repeat 3 (step) 2 repeat 4 (left step left repeat 4(step left) right step) [2]
Page 7 of 18 [Turn over 6 For each part in this question, write the output of the python 3 program. (i) a = 10 b = 3 def f(b, a): a = 2 b = (a + b) // a return b print(f(a, b)) Output: _________________________________ [1] (ii) T = "Coding is very interesting; Lots of fun!" A = T[3].upper() B = T[-13:-10].lower() + T[10:12] C = " " + T[15:18:2] + T[-1] print(A+B+C) Output: _________________________________ [3] (iii) words = ["Code", "Computing", "Future", "Cow", "Thinking"] count = 0 for word in words: v = 0 for char in word: if char in "aeiou": v += 1 if v>2: count += 1 print(count) Output: _________________________________ [1] (iv) Explain what the output for part(iii) represents. [1]
Page 8 of 18 7 The following flowchart describes what a program does. It accepts a list of N numbers as input.
Page 9 of 18 [Turn over 7. Complete the trace table for the following set of data: (a) L = [7] N = ___________ L i Output [7] [1] (b) L = [5, 3] N = ___________ L i j Output [5, 3] [2]
Page 10 of 18 (c) L = [7, 1, 5, 3] N = ___________ L i j Output [3] (d) Explain what the program illustrated by the given flowchart does. [1]
Content continues in the PDF. Download PDF
Related notes
- SST (for revision practice) 2024 S3 Computing EOY P2 QP_FinalExam Papers · 2024
- 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
- SST 2024 Prelim Paper 1 Ans [revised for 2025] Exam Papers · 2024
- SST 2024 Prelim Paper 1 [revised for 2025] Exam Papers · 2024
- [Notes for Computing] All Definitions/ TermsNotes/Practices · 2025
- [Notes for Computing] Heavily Compressed TextbookNotes/Practices · 2025
- All Computing Terms/DefinitionsNotes/Practices · 2025
- See all Computing notes

