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 | |
|---|---|---|
| 1FirstName | AA valid identifier that uses a digit after the first character | |
| 2Score2 | BThe identifier contains an underscore. Only letters and digits are allowed, so it should be FirstName. | |
| 3An identifier must not contain spaces or underscores, so join the words together in PascalCase | CCONSTANT PassMark ← 50 | |
| 4An identifier can be the name of a constant as well as a variable, and it still follows the PascalCase rules | DDECLARE TotalScore : INTEGER | |
| 5DECLARE first_name : STRING | EThe identifier starts with a digit. An identifier must start with a capital letter, so it should be SecondScore. | |
| 6DECLARE 2ndScore : INTEGER | FA valid identifier: PascalCase, letters only, starts with a capital letter |
Complete each line of code by filling in the missing parts.
Shade in the letter of the line that contains an error.
identifier — The name of a variable, constant, procedure or function. Use PascalCase: letters and digits only, no spaces or underscores, start with a capital letter, e.g. FirstName.DECLARE FirstName : STRING
FirstName ← "Ava"
OUTPUT FirstNameDECLARE TotalScore : INTEGER
TotalScore ← 0
OUTPUT TotalScoreDECLARE Score2 : INTEGER
Score2 ← 10
OUTPUT Score2CONSTANT MaxScore ← 100
OUTPUT "Top mark:"
OUTPUT MaxScoreDECLARE TotalCost : REAL
TotalCost ← 9.5
OUTPUT TotalCost