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 | |
|---|---|---|
| 1DECLARE Lives : INTEGER | ACreates a variable called Lives that can store a whole number, such as the number of lives left in a game | |
| 2Score ← -3 | BStores a negative whole number in the variable Score, which is a valid INTEGER value | |
| 3An INTEGER variable holds a whole number with no fractional part, such as a count of items | CCounter ← 5 | |
| 4A valid INTEGER value is written in normal denary digits and can be positive or negative | D2.5 has a fractional part, so it cannot be stored in an INTEGER variable. Use a whole number such as 2, or declare Lives as REAL. | |
| 5DECLARE Lives : INTEGER Lives ← 2.5 | EDECLARE Counter : INTEGER | |
| 6DECLARE Counter : INTEGER Counter ← "5" | F"5" is a STRING because it is in quotes, so it does not match INTEGER. Write the whole number 5 without quotes. |
Complete each line of code by filling in the missing parts.
Shade in the letter of the line that contains an error.
INTEGER — The data type for a whole number with no fractional part, written in denary digits, such as 5 or -3. Used for counts like lives: DECLARE Lives : INTEGERDECLARE Lives : INTEGERDECLARE Change : INTEGER
Change ← -3DECLARE Counter : INTEGER
Counter ← 0DECLARE Lives : INTEGER
Lives ← 3DECLARE Counter : INTEGER
Counter ← 0
Counter ← Counter + 1