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 | |
|---|---|---|
| 1'x' | AAn empty STRING literal: double quotes with no characters between them | |
| 2"" | BA CHAR literal: a single character written inside single quotes | |
| 3A REAL literal must have a digit on each side of the decimal point | CThe REAL literal has no digit before the decimal point. It should be written 0.5. | |
| 4A BOOLEAN literal is written as TRUE or FALSE, with no quote marks | DPrice ← 0.0 | |
| 5Letter ← "x" | EA single CHAR is written in double quotes, which makes it a STRING. CHAR literals need single quotes: 'x'. | |
| 6Height ← .5 | FFound ← TRUE |
Complete each line of code by filling in the missing parts.
Shade in the letter of the line that contains an error.
literal — A fixed value written in code: a real with digits either side of the point (4.7), a CHAR in single quotes ('x'), a STRING in double quotes ("Hello"), or BOOLEAN TRUE or FALSE.DECLARE Total : REAL
Total ← 0.0DECLARE Initial : CHAR
Initial ← 'x'DECLARE Greeting : STRING
Greeting ← "Hello"DECLARE Name : STRING
Name ← ""DECLARE Found : BOOLEAN
Found ← FALSE