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 | AWorks out Counter + 1 using the old value, then stores the result back in Counter, adding 1 to it | |
| 2Counter ← Counter + 1 | BStores the value 0 in the variable Counter, so it starts counting from zero | |
| 3The variable being assigned to is written on the left of the arrow and the value on the right | CThe variable and value are the wrong way round. The variable must be on the left of the arrow, so this should be Counter ← 0. | |
| 4The value assigned must match the data type of the variable, such as a STRING variable receiving text in quotes | DAge is an INTEGER variable, but it is given a STRING value. The value must match the data type, so it should be Age ← 12. | |
| 50 ← Counter | EName ← "Sam" | |
| 6Age ← "twelve" | FTotal ← 25 |
Complete each line of code by filling in the missing parts.
Shade in the letter of the line that contains an error.
Counter ← 0 — The ← assignment operator stores the value on its right in the variable on its left. Here 0 is stored in Counter. The value must match the variable's data type.DECLARE Counter : INTEGER
Counter ← 0DECLARE Counter : INTEGER
Counter ← 0DECLARE Counter : INTEGER
Counter ← 0
Counter ← Counter + 1DECLARE Name : STRING
Name ← "Sam"DECLARE Counter : INTEGER
Counter ← 0
Counter ← Counter + 1