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 TotalToPay : REAL | ACreates a variable called TotalToPay that can hold numbers with decimal places, such as a price | |
| 2DECLARE GameOver : BOOLEAN | BCreates a variable called GameOver that can only hold TRUE or FALSE | |
| 3To create a variable that stores whole numbers, write DECLARE, then the name, a colon and the data type INTEGER | CThe colon is missing between the identifier and the data type. It should be DECLARE Counter : INTEGER | |
| 4A variable must be declared before it is used, so DECLARE comes on the line before the first assignment | DThe variable is used before it is declared. The DECLARE line must come before the assignment | |
| 5DECLARE Counter INTEGER | EDECLARE Score : INTEGER Score ← 0 | |
| 6Total ← 0 DECLARE Total : INTEGER | FDECLARE Counter : INTEGER |
Complete each line of code by filling in the missing parts.
Shade in the letter of the line that contains an error.
DECLARE Counter : INTEGER — Creates a variable called Counter that can only hold whole numbers. Use DECLARE name : TYPE, with a space either side of the colon, before you use the variable.DECLARE Counter : INTEGERDECLARE TotalToPay : REALDECLARE GameOver : BOOLEANDECLARE Counter : INTEGER
Counter ← 5DECLARE Lives : INTEGER
Lives ← 3
OUTPUT Lives