Programming
468 questions. Open a question to solve it and check the official answer.
Constructs · 3 marks · official answer ready
(a) The register for one particular lift contains the following values: In each case below, give the information being represented. lift number (in denary) current floor level (in…
Constructs · 3 marks · official answer ready
(b) State what the register for lift 17 would contain if it is currently on the 25th floor and is going up. [3] 13
Programming basics · 10 marks · official answer ready
(d) The function CheckAnswerCorrect gives the child three chances to type in the correct answer. The function returns TRUE if the child typed the correct answer, and FALSE if all …
Constructs · 9 marks
(a) Complete the pseudocode: FUNCTION TestScoreTotal RETURNS DECLARE AnswerCorrect, : BOOLEAN DECLARE , , : INTEGER // initialise Score Finish FALSE REPEAT Number1 // generate two…
Constructs · 5 marks · official answer ready
(i) A function, FindArrayIndex, is needed to return the array index of the record in which the child’s name is stored. Write pseudocode for this function. Assume: • the child’s na…
Constructs · 2 marks · official answer ready
(b) A child might type in their name with a mixture of upper and lower case letters and the program must allow for this. For example, ALI and Ali are treated as the same name. Des…
Programming basics · 10 marks · official answer ready
(d) The function CheckAnswerCorrect gives the child three chances to type in the correct answer. The function returns TRUE if the child typed the correct answer, and FALSE if all …
Constructs · 9 marks
(a) Complete the pseudocode: FUNCTION TestScoreTotal RETURNS DECLARE AnswerCorrect, : BOOLEAN DECLARE , , : INTEGER // initialise Score Finish FALSE REPEAT Number1 // generate two…
Constructs · 5 marks · official answer ready
(i) A function, FindArrayIndex, is needed to return the array index of the record in which the child’s name is stored. Write pseudocode for this function. Assume: • the child’s na…
Constructs · 2 marks · official answer ready
(b) A child might type in their name with a mixture of upper and lower case letters and the program must allow for this. For example, ALI and Ali are treated as the same name. Des…
Structured programming · 1 mark · official answer ready
(c) Sheena could have written the algorithm in part (a)(ii) as a procedure. What is the difference between a function and a procedure? [1] 4
Constructs · 8 marks
(d) Raul wants the user to be able to use an “undo” option to clear the previous entry if they think they have made an error. The “undo” option can be used repeatedly to return to…
Constructs · 20 marks · official answer ready
5 Raul copied the following pseudocode from a computing textbook. He wants to find out what it does. (i) Dry run the pseudocode using the trace table. FOR x 2 TO 4 ThisValue List[…
Constructs · 23 marks
5 7 8 6 5 1 9 2 4 3 7 9 5 4 9 3 2 5 7 4 6 1 8 4 1 6 4 1 7 8 6 3 9 5 2 7 1 6 3 2 4 7 8 9 1 6 5 1 4 6 3 1 7 9 4 5 6 8 2 3 5 8 1 6 5 8 3 2 1 7 9 4 1 4 9 7 8 3 6 1 5 2 4 9 2 7 1 5 9 6…
Constructs · 5 marks
5 7 8 6 5 1 9 2 4 3 7 9 5 4 9 3 2 5 7 4 6 1 8 4 1 6 4 1 7 8 6 3 9 5 2 7 1 6 3 2 4 7 8 9 1 6 5 1 4 6 3 1 7 9 4 5 6 8 2 3 5 8 1 6 5 8 3 2 1 7 9 4 1 4 9 7 8 3 6 1 5 2 4 9 2 7 1 5 9 6…
Constructs · 1 mark · official answer ready
(iii) player(Who, f, _ ) [1] 7
Constructs · 1 mark · official answer ready
(i) Describe what this rule is designed to do. [1]
Constructs · 3 marks · official answer ready
(ii) Identify what needs to be added to the above rule to check if a player is eligible to play for a team. [3] 8
Constructs · 1 mark · official answer ready
(iii) player(Who, f, _ ) [1] 7
Constructs · 1 mark · official answer ready
(i) Describe what this rule is designed to do. [1]
