Computer Science 9608 · 11

Programming

471 questions. Open a question to solve it and check the official answer.

2017 October-November · Paper 43 · Q4(b)

Constructs · 0 marks · official answer ready

(b) Five numbers are stored, starting in the location labelled NUMBERS. A program is needed to multiply each of the numbers by 4 and store them back in their original location. Wr…

2017 May-June · Paper 11 · Q5(a)(iii)

Constructs · 2 marks · official answer ready

(iii) Describe how the computer uses the parity byte to perform a further check on the received data bytes. .......................................................................…

2017 May-June · Paper 11 · Q5(b)(ii)

Constructs · 3 marks · official answer ready

(ii) Explain how you arrived at your answers for part (b)(i). .....................................................................................................................…

2017 May-June · Paper 11 · Q6(a)

Programming basics · 3 marks · official answer ready

6 (a) The operating system (OS) contains code for performing various management tasks. The appropriate code is run when the user performs various actions. Draw a line to link each…

2017 May-June · Paper 11 · Q11

Constructs · 9 marks · official answer ready

11 if (x == "") 12 { 13 alert(Message1) 14 } 15 else 16 { 17 alert(Message2) 18 } 19 } 20 21 22 23 24 25 Product code: 26 27 Number: 28 29 30 Submit order: 31 34 35 36 37 38 15 (i…

2017 May-June · Paper 11 · Q38

Constructs · 9 marks

38 15 (i) The developer has used three variables in the JavaScript code. State the identifiers used. 1 .................................................................. 2 .......…

2017 May-June · Paper 12 · Q4(b)(iv)

Constructs · 1 mark · official answer ready

(iv) The user clicked on an attachment in an unsolicited email. Since then, the computer has shown some unexplained behaviours. Utility software solution: ........................…

2017 May-June · Paper 12 · Q6(c)(iii)

Constructs · 1 mark · official answer ready

(iii) The JavaScript code uses a selection statement. State the line number which contains its condition. Line number: .................................... [1]

2017 May-June · Paper 12 · Q6(c)(v)

Constructs · 4 marks · official answer ready

(v) Name and describe two other types of validation check which could be appropriate for this data capture form. Validation check: ................................................…

2017 May-June · Paper 12 · Q40

Constructs · 9 marks

40 13 (i) The developer has used three variables in the JavaScript code. State the identifiers used. 1. .................................... 2. ...................................…

2017 May-June · Paper 13 · Q6(a)

Programming basics · 3 marks · official answer ready

6 (a) The operating system (OS) contains code for performing various management tasks. The appropriate code is run when the user performs various actions. Draw a line to link each…

2017 May-June · Paper 13 · Q11

Constructs · 9 marks · official answer ready

11 if (x == "") 12 { 13 alert(Message1) 14 } 15 else 16 { 17 alert(Message2) 18 } 19 } 20 21 22 23 24 25 Product code: 26 27 Number: 28 29 30 Submit order: 31 34 35 36 37 38 15 (i…

2017 May-June · Paper 13 · Q38

Constructs · 9 marks

38 15 (i) The developer has used three variables in the JavaScript code. State the identifiers used. 1 .................................................................. 2 .......…

2017 May-June · Paper 21 · Q3

Constructs · 11 marks · official answer ready

3 A string conversion function, StringClean, is to be written. This function will form a new string, OutString, from a given string, InString, by: • removing all non-alphabetic ch…

2017 May-June · Paper 21 · Q5

Programming basics · 10 marks · official answer ready

5 A multi-user computer system records user login information in a text file, LoginFile.txt. Each time a user successfully logs into the system, the following information is recor…

2017 May-June · Paper 21 · Q6(a)

Constructs · 10 marks · official answer ready

(a) Write program code to implement the new function ValidatePassword. Visual Basic and Pascal: You should include the declaration statements for variables. Python: You should sho…

2017 May-June · Paper 21 · Q6(b)(i)

Constructs · 5 marks · official answer ready

(i) The function will be tested. Give a valid string to check that the function returns TRUE under the correct conditions. String1: ...............................................…

2017 May-June · Paper 22 · Q4(c)

Constructs · 42 marks

(c) The file may not contain an entry for every user. If the user ID is not found, then the name “Guest” should be used as the preferred name. Use structured English to write a mo…

2017 May-June · Paper 22 · Q6(a)

Constructs · 9 marks · official answer ready

(a) Write program code to implement the new function, ValidateRegistration. Visual Basic and Pascal: You should include the declaration statements for variables. Python: You shoul…

2017 May-June · Paper 23 · Q3

Constructs · 11 marks · official answer ready

3 A string conversion function, StringClean, is to be written. This function will form a new string, OutString, from a given string, InString, by: • removing all non-alphabetic ch…