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 | |
|---|---|---|
| 1NumberOfPlayers | AThe identifier starts with a digit. It must start with a letter, for example SecondPlayer. | |
| 2Score2 | BA good identifier in Pascal case: a capital letter starts each word and there are no spaces or underscores | |
| 3An identifier must not contain spaces or underscores, so each word is joined and starts with a capital letter | CCountdown and CountDown | |
| 4Identifiers are not case sensitive, so these two names refer to the same variable | DA valid identifier that uses a digit, which is allowed because it does not come first | |
| 5DECLARE 2ndPlayer : STRING | EThe identifier uses underscores and no capital letters. Pascal case would be NumberOfPlayers. | |
| 6DECLARE number_of_players : INTEGER | FTotalScore |
Complete each line of code by filling in the missing parts.
Shade in the letter of the line that contains an error.
NumberOfPlayers — An identifier: a variable name in Pascal case. Capital letter starts each word, letters and digits only, no spaces or underscores, can't start with a digit. Not case sensitive.// Stores how many people are playing
DECLARE NumberOfPlayers : INTEGERDECLARE Score : INTEGER
Score ← 0
Score ← Score + 1DECLARE HighScore : INTEGERDECLARE FirstName : STRING
OUTPUT "Enter your first name"
INPUT FirstName// Is the game finished?
DECLARE GameOver : BOOLEAN