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 GameOver : BOOLEAN | ATRUE is in quotes, so it is a STRING and not a BOOLEAN value. It should be GameOver ← TRUE | |
| 2GameOver ← TRUE | BDECLARE LevelComplete : BOOLEAN | |
| 3A BOOLEAN variable can hold yes/no information, such as whether a player has finished the level | CYES is not a BOOLEAN value. A BOOLEAN can only be TRUE or FALSE, so use GameOver ← TRUE | |
| 4TRUE and FALSE are keywords, so they are written without quotes when assigned | DCreates a variable called GameOver that can only store TRUE or FALSE | |
| 5GameOver ← "TRUE" | EGameOver ← FALSE | |
| 6GameOver ← YES | FStores the BOOLEAN value TRUE in GameOver, for example to show the game has ended |
Complete each line of code by filling in the missing parts.
Shade in the letter of the line that contains an error.
BOOLEAN — A data type with only two possible values, TRUE or FALSE, written without quotes. Used for yes/no information, e.g. DECLARE GameOver : BOOLEANDECLARE GameOver : BOOLEANGameOver ← FALSEDECLARE IsRaining : BOOLEANIF Lives = 0 THEN
GameOver ← TRUE
ENDIFDECLARE LoggedIn : BOOLEAN
LoggedIn ← TRUE
OUTPUT LoggedIn