Computer Science 0478 · 8

Programming

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

Reset
2025 February-March · Paper 22 · Q6(c)

Programming concepts · 4 marks · official answer ready

(c) Explain how you could change the corrected algorithm so that it also finds the smallest number that was input and outputs its value at the end. Any code used must be fully exp…

2025 February-March · Paper 22 · Q7(c)(i)

Programming concepts · 3 marks · official answer ready

(i) Explain how you would change the algorithm to prevent the problems described. .................................................................................................…

2025 February-March · Paper 22 · Q10

Arrays · 15 marks · official answer ready

10 A sports club uses a six-character alphanumeric membership code to identify each member of the club. The one-dimensional (1D) array MemberID[] is used to store the unique membe…

2024 October-November · Paper 11 · Q6(c)

Programming concepts · 1 mark · official answer ready

(c) The washing machine needs to display error codes on a small screen if there is a problem with the washing machine. The error codes are stored as binary. The binary numbers are…

2024 October-November · Paper 13 · Q2(b)

Programming concepts · 2 marks · official answer ready

(b) Give two benefits of compressing the report file before emailing it. 1 ........................................................................................................…

2024 October-November · Paper 21 · Q3

Programming concepts · 4 marks · official answer ready

3 Four operators and three types of operator are shown. Draw one or more lines from each operator to its correct operator type. Operator Operator type >= Boolean AND Arithmetic DI…

2024 October-November · Paper 21 · Q6(b)

Arrays · 3 marks · official answer ready

(b) Write the pseudocode to display, with suitable messages, the number of zeros stored in the array and the total of the non-zero values. ........................................…

2024 October-November · Paper 21 · Q6(c)

Programming concepts · 3 marks · official answer ready

(c) Meaningful identifiers have not been used in the algorithm. Suggest suitable meaningful identifiers for: The array: A .........................................................…

2024 October-November · Paper 21 · Q8(b)

Programming concepts · 3 marks · official answer ready

(b) The accepted password, Password, is to be written to the file MyPassword.txt Write pseudocode to: • open the file • write the accepted password to the file • close the file. .…

2024 October-November · Paper 21 · Q8(c)

Programming concepts · 2 marks · official answer ready

(c) Explain why the accepted password needs to be stored in a file. ...............................................................................................................…

2024 October-November · Paper 21 · Q11

Programming concepts · 0 marks · official answer ready

11 THEN

2024 October-November · Paper 21 · Q19(a)

Programming concepts · 4 marks

(a) Identify the line numbers of four errors in the pseudocode and suggest a correction for each error. Error 1 line number .......................................................…

2024 October-November · Paper 21 · Q19(d)(ii)

Arrays · 17 marks

(ii) Explain how one of the lines in your statement in part (d)(i) could be changed to display the same information. ..............................................................…

2024 October-November · Paper 22 · Q2

Programming concepts · 1 mark · official answer ready

2 Tick (✓) one box to complete this sentence. A pseudocode example of a selection statement is A CALL Sorting(Value1, Value2) B DECLARE Count : INTEGER C IF X = 7 THEN Y 21 ENDIF …

2024 October-November · Paper 22 · Q7(b)

Programming concepts · 1 mark · official answer ready

(b) State the purpose of this algorithm. ..........................................................................................................................................…

2024 October-November · Paper 22 · Q7(c)

Programming concepts · 2 marks · official answer ready

(c) Describe the problem that would be caused in this algorithm if a Value of 1, 0 or less than –1 was input. .....................................................................…

2024 October-November · Paper 22 · Q10

Programming concepts · 6 marks · official answer ready

10 The function LENGTH(X) calculates the length of a string X Write the pseudocode statements to: • allow a line of text to be input to an appropriate variable • store this line o…

2024 October-November · Paper 22 · Q12

Arrays · 15 marks · official answer ready

12 A one-dimensional (1D) array Rooms[] contains the names of up to 20 rooms in a house. A two-dimensional (2D) array Dimensions[] is used to store the length, width and area of e…

2024 October-November · Paper 23 · Q6

Programming concepts · 10 marks

6 An incomplete algorithm has been written in pseudocode to count the number of values stored in an array and to find their average. Values have been stored in the array starting …

2024 October-November · Paper 23 · Q6(a)

Programming concepts · 4 marks · official answer ready

6 An incomplete algorithm has been written in pseudocode to count the number of values stored in an array and to find their average. Values have been stored in the array starting …