Computer Science · May / June 2020 · Paper 21 · Question 4
0478
As printed in the paper
The question as text
The pseudocode algorithm shown should allow numbers to be entered and should allow 50 numbers to be stored in an array. Count ← 0 REPEAT INPUT Values[Count] Count ← Count + 1 UNTIL Count = 0
Read automatically from the paper; the printed page above is exact.
Show the answer and mark scheme
4(a)[2]
Any two correct statements (max two) e.g.
The value of the variable Count begins as 0 …… and is incremented by 1 before it is tested by the loop conditionCount will never be 0 at the end of the loop4(b)[4]
Count ← 0
REPEAT
INPUT Number
IF Number >= 100
THEN
Values[Count] ← Number
ENDIF
Count ← Count + 1
UNTIL Count = 50
One mark – separate INPUT statement
One mark – IF statement attempted
One mark – IF statement completely correct
One mark – termination of loop updated
4(c)[2]
Any two correct statements (max two) e.g.
Alter the IFstatement/add a second IF statement/comparison that’s already there …… so that additional criteria set an upper limit of <=200
Make a free account to save your answers and see your weak topics and ask the AI why a wrong answer is wrong.

