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 Initial : CHAR | ADECLARE Grade : CHAR DECLARE Surname : STRING | |
| 2DECLARE FirstName : STRING | BTwo variables are declared on one line. Each variable needs its own DECLARE line with its own type, and a surname is text, so it should be STRING. | |
| 3Each variable needs its own DECLARE line with one type, so declare a CHAR variable and a STRING variable on separate lines | CCreates a variable called Initial that can hold a single character, such as 'A' | |
| 4Declare a variable to hold a whole word or sentence, such as a town name | DCreates a variable called FirstName that can hold text of any length, such as "Ava" | |
| 5DECLARE Initial, Surname : CHAR | EDECLARE Town : STRING | |
| 6DECLARE FirstName STRING | FThe colon is missing between the identifier and the data type. |
Complete each line of code by filling in the missing parts.
Shade in the letter of the line that contains an error.
DECLARE Initial : CHAR — DECLARE creates a variable and sets its type. Here Initial can hold one CHAR (a single character). Use : STRING instead for text, e.g. DECLARE FirstName : STRING.DECLARE Initial : CHARDECLARE Initial : CHARDECLARE FirstName : STRINGDECLARE Initial : CHAR
DECLARE FirstName : STRINGDECLARE Initial : CHAR
DECLARE FirstName : STRING