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 Grade : CHAR | AGrade holds exactly one character, such as a grade letter like A, B or C | |
| 2DECLARE PhoneNumber : STRING | BDECLARE Answer : CHAR | |
| 3A name can be any length, so it should be stored as a STRING | CPhoneNumber holds text of any length; digits are stored as text because they are not used in calculations | |
| 4A yes or no answer of 'Y' or 'N' is always one character, so it is a CHAR | DA surname can be many characters long, so it needs STRING, not CHAR. CHAR holds only one character. | |
| 5DECLARE Surname : CHAR | EA grade letter is always exactly one character, so CHAR is the better choice. The CHAR literal would also use single quotes: 'A'. | |
| 6DECLARE Grade : STRING Grade ← "A" | FDECLARE FirstName : STRING |
Complete each line of code by filling in the missing parts.
Shade in the letter of the line that contains an error.
CHAR or STRING — Use CHAR for a value that is always exactly one character, like a grade letter or Y/N. Use STRING for text of any length, including none, like a name or phone number.DECLARE Grade : CHAR
Grade ← 'B'DECLARE FirstName : STRING
FirstName ← "Priya"DECLARE PhoneNumber : STRING
PhoneNumber ← "07700900123"DECLARE Answer : CHAR
OUTPUT "Continue? (Y/N)"
INPUT AnswerDECLARE Comment : STRING
Comment ← ""