GCSE Computer Science, Programming. Usually met in years 9 to 11.
Read short programs in pseudocode and work out what they output, with variables, loops, selection and arrays.
What you practise
Following assignments line by line
DIV, MOD and FOR loops
WHILE loops, IF statements and arrays
Starts with a few assignments and builds to loops over arrays. Programs are written in exam-style pseudocode. Practice moves up a level when a round goes well and down when it does not.
Sample questions
Each sample comes with the method and the reason every wrong option is wrong. Real practice rounds are ten questions at your level.
Sample question, level 2 of 5
What does this program output? (DIV is whole-number division; MOD is the remainder.)
n ← 35
OUTPUT n MOD 6
1
5
5.83
6
29
Show the answer and method
Answer: B, 5
The method: 35 ÷ 6 = 5 remainder 5. So 35 DIV 6 = 5 and 35 MOD 6 = 5. The output is 5.
Why the other options are wrong:
A, 1: That is how far from the next multiple, not the remainder.
C, 5.83: That is ordinary division, with a decimal part.
D, 6: Close, but check your working: this is a small slip away from the answer.
E, 29: That subtracts once instead of dividing.
Sample question, level 4 of 5
What does this program output?
x ← 3
count ← 0
WHILE x < 58
x ← x * 2
count ← count + 1
ENDWHILE
OUTPUT count
5
6
4
19
96
Show the answer and method
Answer: A, 5
The method: x doubles until it is at least 58: it ends at 96 after 5 times round, so count is 5.
Why the other options are wrong:
B, 6: When x reaches 96 the condition x < 58 is false, so the loop stops.
C, 4: Check the last time round: x is still below 58 before the last doubling.
D, 19: The loop doubles x; it does not count up in steps.