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 | ASets MaxScore to the literal 100 with no DECLARE needed, so changing the 100 here updates it everywhere | |
| 2CONSTANT MaxScore ← 100 | BThe value of a constant must be a literal such as 6.50, not an expression that uses a variable like Hours. | |
| 3A constant is given its value using only a literal, not a calculation or an INPUT | CCreates a constant called HourlyRate that is set once to 6.50 and never changes while the program runs | |
| 4A constant needs no DECLARE, so it is created in a single line that gives it its name and value | DCONSTANT VatRate ← 20 | |
| 5DECLARE HourlyRate : REAL CONSTANT HourlyRate ← 6.50 | EA constant does not need a DECLARE line. DECLARE is for variables, so the first line should be removed. | |
| 6CONSTANT HourlyRate ← Hours * 6.50 | FCONSTANT PassMark ← 50 |
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 — Names a value set once with a literal. It never changes, needs no DECLARE, and can be updated in one place.CONSTANT HourlyRate ← 6.50CONSTANT HourlyRate ← 6.50CONSTANT HourlyRate ← 6.50
Pay ← Hours * HourlyRateCONSTANT MaxMarks ← 100
Percent ← Mark / MaxMarks * 100CONSTANT HourlyRate ← 6.50
Hours ← 4
Pay ← Hours * HourlyRate