Tip: Choose Save as PDF in the print dialog to download. Use A4 paper size.
Shade in the A or B circle for each question.
Draw a line connecting each item on the left to its match on the right.
| Left column | Right column | |
|---|---|---|
| 1Counter ← 0 | ACounter ← Counter + 1 | |
| 2Score ← 10 Score ← 15 | BTotal ← 25 | |
| 3The arrow points to the variable that receives the value, so the variable goes on the left | CUses = instead of the ← assignment operator. Cambridge pseudocode stores a value with ←, so it should be Counter ← 0. | |
| 4The ← operator means 'store this value', it is not the same as = in a maths equation. It adds 1 to the old value, then stores the result | DThe arrow points the wrong way round: the value is on the left and the variable is on the right. A value cannot receive a value. It should be Counter ← 0. | |
| 50 ← Counter | EStores the value 0 in the variable Counter, so the counter starts at zero | |
| 6Counter = 0 | FScore ends up holding 15, because the new value replaces the earlier value 10 |
Complete each line of code by filling in the missing parts.
Shade in the letter of the line that contains an error.
Counter ← 0 — Assignment: the value on the right of the arrow is stored in the variable on the left. Counter ← 0 stores 0 in Counter and replaces any earlier value.Counter ← 0DECLARE Counter : INTEGER
Counter ← 0Counter ← 0
Counter ← Counter + 1Score ← 5
Score ← 8
OUTPUT ScoreTotal ← 0
Total ← Total + 10