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 | AThe assignment arrow ← is missing between the identifier and the value. | |
| 2CONSTANT MaxScore ← 100 | BGives the fixed value 100 a meaningful name so the code is easier to read | |
| 3A constant's value can only be a literal, such as a number, text or TRUE/FALSE | CCONSTANT HourlyRate ← 7.00 | |
| 4To change a constant's value, you edit it in one place only, where it is declared | DThe value is a calculation using a variable, not a literal. A constant can only be given a literal value. | |
| 5CONSTANT HourlyRate ← Hours * 6.50 | EDeclares a constant called HourlyRate that always holds the literal value 6.50 | |
| 6CONSTANT HourlyRate 6.50 | FCONSTANT Pi ← 3.14 |
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 fixed literal value that never changes while the program runs. It makes code easier to read, and you update the value in one place only.CONSTANT HourlyRate ← 6.50CONSTANT HourlyRate ← 6.50CONSTANT HourlyRate ← 6.50
Pay ← Hours * HourlyRate// The pay rate rises to 7.00
CONSTANT HourlyRate ← 7.00// A class has 30 students
CONSTANT ClassSize ← 30