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 | |
|---|---|---|
| 1Counter ← Counter + 1 | AMultiplies the hours by the hourly rate and stores the result in TotalToPay. | |
| 2TotalToPay ← NumberOfHours * HourlyRate | BWorks out Counter + 1 using the old value, then stores the result back in Counter, so it goes up by one. | |
| 3Setting a counter to start at zero before a loop begins | CThe left side of ← must be a single variable, not an expression. The value to store must be on the right. Correct: Counter ← Counter + 1 | |
| 4The variable being assigned to goes on the left of the arrow only, and the value or expression goes on the right | DScore ← Score + 5 | |
| 5Counter + 1 ← Counter | EAge is an INTEGER variable, so it cannot store a string. The value must match the data type. Correct: Age ← 16 | |
| 6Age ← "sixteen" | FCounter ← 0 |
Complete each line of code by filling in the missing parts.
Shade in the letter of the line that contains an error.
<identifier> ← <value> — Assignment stores the value on the right of ← in the variable on the left. The value must match the variable's data type, e.g. Counter ← Counter + 1.Counter ← 0Counter ← Counter + 1TotalToPay ← NumberOfHours * HourlyRateTotalToPay ← NumberOfHours * HourlyRateDECLARE IsValid : BOOLEAN
IsValid ← TRUE