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 | |
|---|---|---|
| 1Score ← 10 score ← 20 | ADECLARE HighScore : INTEGER DECLARE LowScore : INTEGER | |
| 2DECLARE PlayerName : STRING | BMixed case marks where each new word starts, making the name easier to read | |
| 3Identifiers are case insensitive, so these two names refer to the same variable | CTotalMarks and totalmarks | |
| 4Avoid near-duplicate names by giving each variable a clearly different name | DTotal, TOTAL and total look different but are one variable, which is confusing to read. | |
| 5DECLARE Countdown : INTEGER DECLARE CountDown : INTEGER | EThe two names differ only in capital letters, so they are the same identifier and are declared twice. | |
| 6Total ← 5 TOTAL ← Total + 1 OUTPUT total | FBoth lines change the same variable, so Score now holds 20 |
Complete each line of code by filling in the missing parts.
Shade in the letter of the line that contains an error.
case insensitive — Capital letters do not matter in identifiers, so Countdown and CountDown are the same name. Never use names that differ only in case as two separate variables.DECLARE Countdown : INTEGER
COUNTDOWN ← 10
OUTPUT countdownDECLARE PlayerName : STRING
PLAYERNAME ← "Sam"
OUTPUT playernameDECLARE Lives : INTEGER
Lives ← 3
OUTPUT LIVESDECLARE HighScore : INTEGER
HighScore ← 50
OUTPUT HIGHSCOREDECLARE Age : INTEGER
INPUT AGE
OUTPUT age