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 | |
|---|---|---|
| 1Count ← 0 | AThe value and the variable are the wrong way round. The variable must be on the left of ← and the value on the right. | |
| 2Total ← Total + Number | BArea ← Length * Width | |
| 3Assigning the result of a calculation: the right side is worked out, then stored in the variable on the left | CStores the constant 0 in the variable Count, so Count starts at 0 | |
| 4Reassigning a variable: a new value replaces the old value that was stored before | DAdds Number to the current Total and stores the new result back in Total | |
| 510 ← Count | E= is used instead of ←. In Cambridge pseudocode = tests whether two values are equal, it does not store a value. | |
| 6Count = 0 | FScore ← 10 Score ← 15 |
Complete each line of code by filling in the missing parts.
Shade in the letter of the line that contains an error.
Count <- 0 — The <- operator stores the value on its right in the variable on its left. Count <- 0 puts 0 into Count. It is assignment, not a test for equality.Count <- 0Total <- Total + NumberArea <- Length * WidthScore <- 10
Score <- Score + 5Lives <- 3
Lives <- Lives - 1