Programming
221 questions. Open a question to solve it and check the official answer.
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…
Programming concepts · 3 marks · official answer ready
(i) Explain how you would change the algorithm to prevent the problems described. .................................................................................................…
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…
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…
Programming concepts · 2 marks · official answer ready
(b) Give two benefits of compressing the report file before emailing it. 1 ........................................................................................................…
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…
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. ........................................…
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 .........................................................…
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. .…
Programming concepts · 2 marks · official answer ready
(c) Explain why the accepted password needs to be stored in a file. ...............................................................................................................…
Programming concepts · 0 marks · official answer ready
11 THEN
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 .......................................................…
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. ..............................................................…
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 …
Programming concepts · 1 mark · official answer ready
(b) State the purpose of this algorithm. ..........................................................................................................................................…
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. .....................................................................…
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…
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…
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 …
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 …
