ZHSS 2018 P1 Solution
Uploaded by IDKWHYBUTIAM · 3 November 2024
Preview
Text from the first pagesSetter: Mr. Calvin Heng Vetter: Mr. Low Kee Ley This question paper consists of 15 printed pages including this cover page. ZHONGHUA SECONDARY SCHOOL PRELIMINARY EXAMINATION 2018 SECONDARY 4 EXPRESS Candidate’s Name Class Register Number MODEL ANSWER, TOS COMPUTING 7155/01 Paper 1 13 Sep 2018 2 hours Additional Materials: NIL READ THESE INSTRUCTIONS FIRST Write your index number and name on all the work you hand in. Write in dark blue or black pen on both sides of the paper. You may use a pencil for any diagrams or graphs. Do not use staples, paper clips, glue or correction fluid. Answer all the questions. Write your answers in this question booklet. Give non-exact numerical answers correct to 3 significant figures, or 1 decimal place in the case of angles in degrees, unless a different level of accuracy is specified in the question. The use of a scientific calculator is expected, where appropriate. You are reminded of the need for clear presentation in your answers. At the end of the presentation, fasten all your work securely together. The number of marks is given in brackets [ ] at the end of each question or part question. The total number of marks for this paper is 80. For Examiner’s Use:
2 1 Define the term ‘computer’. [3] It is a device that can receive data, process the data according to a set of instructions, and produce the processed data as a result. _____________________________________________________________ It is said that the modern smartphone is a computer. From your definition above, describe two areas where the smartphone meets the requirements of the definition. [2] Smartphones have a keypad where alphanumeric characters can be entered as text. Depending on the App, e.g. messaging, the text can then be transmitted according to programmed instructions. <Reasonable answers that match the Definition portion>
3 2 Number Systems. All workings must be shown clearly. (a) Convert the Hexadecimal number 4D to Denary: [2] 77 (b) Convert the Binary number 101011110101 to Hexadecimal: [2] AF5 (c) Convert the Denary number 844 to Hexadecimal: [2] 34C (d) Convert the Binary number 1010111111001000 to Denary: [2] 45000 3 Data Protection. (a) Study the following exhibit. Is this a case of data loss or data corruption? Explain your answer briefly. [2] Data Loss. The header fields of the table are corrupted. This renders the table useless as the contents are now meaningless. (b) Describe one way to prevent Data Loss. [1] Having a scheduled backup cycle. <Reasonable Answers>
4 4 Complete the following table by writing in the type of Malicious Software next to its description. Type of Malicious Software Description (a) A hidden program that secretly collects personal information about its users and transmits this information to attackers without the users’ knowledge. [1] (b) A computer program that runs automatically and attempts to spread by sending copies of itself to other computers, without the need to attach itself to an existing program. [1] (c) A computer program that pretends to be a harmless file or useful application, but when activated, does harmful things like grant unauthorised access to the computer. [1] 5 For the following scenarios, state whether the person described is guilty of copyright infringement, plagiarism, or both by putting a tick ( ü ) in the box. [4] Scenario Copyright Infringement Plagiarism (a) Jason takes his friend’s python program and submits it for a contest as his own program without his friend’s permission. ü ü (b) Jason installs a crack on a software application so that he can use it for free. ü (c) Jason found a programming solution on a public domain website and submits it as his own work for an assignment. ü SPYWARE WORM TROJAN HORSE
5 6 Study the problem statement below and answer the questions: Problem Statement Your 70-year-old grandma is trying to access her Central Provident Fund information on the www.cpf.gov.sg website. As she knows you are a student of Computing, she requests for your help in logging in. You are presented with the following screen: (a) What are the inputs for this screen? [3] Grandma’s SingPass ID, usually it is the NRIC Grandma’s Password, usually following specified character requirements Clicking on the Login Button In order to improve security, websites use two-factor authentication. [2] What is two-factor authentication? Security protocol above usual ID and Password, requirement information which only the user has. For example, token device. The next screen shows two-factor authentication in action. (c) Describe how the process works here, using her mobile phone. [1] Website sends 6 digit one-time password to grandma’s phone via SMS. Grandma keys in this password into the OTP field and clicks on Submit.
6 7 Study the following program code: Annotate the program with the following Labels: LABEL STATEMENT (a) A Sub-Goal Labelling {Has been done for you as an example} (b) B Iteration over Condition Statement [1] (c) C Iteration over Sequence Statement [1] (d) D Selection Statement [1] 8 Study the following program carefully: Line Program Code ----- ------------------- 001 def dectobin(n): 002 binary = 0 003 while str(n): 004 if n // 2 == 0: 005 binary += ‘0’ 006 else: 007 binary += ‘1’ 008 n = n // 2 009 return ‘’.join(reversed(result)) The programmer tests this program by issuing the following commands: print(dectobin(2)), with expected result as: ‘10’ Print(dectobin(10)), with expected result as: ‘1010’ Unfortunately, errors of various kinds start to appear. Please help to debug the program.
7 There are four errors in this program. Locate the errors (state the line number) and state the correction in the program: (a) Error 1: [2] LINE 002 Correction: binary = ‘’ (b) Error 2: [2] LINE 003 Correction: while n: (c) Error 3: [2] LINE 004 Correction: if n % 2 == 0 (d) Error 4: [2] LINE 008 Correction: Indent n = n // 2 to be aligned with if statement
8 9 Study the program (func_s) below. Use the Trace Table for the inputs of: a_list = [5, 4, 3, 2] (values of i and j have been placed for you) def func_s(a_list): # a_list is a list of integers for i in range(len(a_list)): for j in range(len(a_list)-1): if a_list[j] > a_list[j+1]: a_list[j], a_list[j+1] = a_list[j+1], a_list[j] print(a_list) return a_list (a) Complete the Trace Table here: [4] i j a_list 01 0 0 4 5 3 2 02 1 4 3 5 2 03 2 4 3 2 5 04 1 0 3 4 2 5 05 1 3 2 4 5 06 2 3 2 4 5 07 2 0 2 3 4 5 08 1 2 3 4 5 09 2 2 3 4 5 10 3 0 2 3 4 5 11 1 2 3 4 5 12 2 2 3 4 5 (b) What does this program do? [1] THIS PROGRAM SORTS A LIST OF INTEGERS IN ASCENDING ORDER. (c) Make a suggestion to improve the efficiency of this program. [1] USE A FLAG (BOOLEAN VARIABLE) TO CHECK IF LIST IS SORTED – THEN EXIT FROM OUTERMOST FOR-LOOP.
9 10 Data validation is an important function for many software applications. You have been tasked to write a specification for performing data validation on the Email field. Please focus your answer on the Format Check. Here is a typical example of an Email ID: firstname.lastname@service.domain_name Discuss four aspects of your format check in your specification. (a) The ‘@’ symbol must appear after the init
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

