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 | |
|---|---|---|
| 1CONSTANT HourlyRate ← 6.50 | ACONSTANT VATRate ← 0.20 | |
| 2CONSTANT DefaultText ← "N/A" | BA constant is given its value with the ← assignment arrow, not =. It should be CONSTANT DefaultText ← "N/A". | |
| 3A constant is declared with the CONSTANT keyword, an identifier, the ← operator and a literal value | CDeclares a constant named DefaultText holding the string "N/A". No DECLARE line is needed because the text literal makes it a STRING. | |
| 4A constant needs no DECLARE line and no data type, because the data type comes from the literal | DDeclares a constant named HourlyRate with the value 6.50, so it is a REAL. The value is set once and cannot change. | |
| 5DECLARE HourlyRate : REAL CONSTANT HourlyRate ← 6.50 | EA constant must not have a DECLARE line or a data type. Remove the DECLARE line and keep only CONSTANT HourlyRate ← 6.50. | |
| 6CONSTANT DefaultText = "N/A" | FCONSTANT MaxScore ← 100 |
Complete each line of code by filling in the missing parts.
Shade in the letter of the line that contains an error.
CONSTANT HourlyRate ← 6.50 — Declares a named value that is set once. No DECLARE line or data type is needed: the type comes from the literal, so 6.50 makes it REAL. The value cannot change later.CONSTANT HourlyRate ← 6.50CONSTANT HourlyRate ← 6.50CONSTANT HourlyRate ← 6.50
OUTPUT HourlyRate * 8CONSTANT HourlyRate ← 6.50
// Data type: REALCONSTANT DefaultText ← "N/A"
// No DECLARE line is needed