Question 1
1 markThe pseudo-code statement below is run.
x ← 20 / 8State the value stored in x.
Model answer
2.5
Explanation
The / operator in AQA pseudo-code is real division, so the result keeps its fractional part: 20 / 8 = 2.5. Integer division would need DIV, which gives 2, and the remainder (4) would need MOD.
Mark scheme
-
1 mark
2.5
Mark is for AO2 (apply). A. 2.50 R. 2 (this is 20 DIV 8). R. 4 (this is 20 MOD 8). A correct answer with no working scores the mark.