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 | |
|---|---|---|
| 1Total = 0 | AIF Score = 5 THEN | |
| 2Total ← 0 | BWrong: = compares, so this does not store 0 in Total. It should be Total ← 0. | |
| 3Use ← to store a value in a variable | C= is used to assign, but = only compares. The fix is Count ← Count + 1. | |
| 4Use = to compare a variable with a value in a condition | DCorrect: stores the value 0 in the variable Total. | |
| 5Count = Count + 1 | E← is used to compare, but ← only assigns. The fix is IF Score = 5 THEN. | |
| 6IF Score ← 5 THEN | FScore ← 5 |
Complete each line of code by filling in the missing parts.
Shade in the letter of the line that contains an error.
Total ← 0 — Use ← to store a value, so write Total ← 0, not Total = 0. Use = only to compare, as in IF Score = 5, not IF Score ← 5. Swapping them is an error.Total ← 0IF Score = 5 THEN
OUTPUT "Full marks"
ENDIFPrice ← 10
Total ← Price * 2
OUTPUT TotalDECLARE Total : INTEGER
Total ← 0
OUTPUT TotalIF Answer = "Y" THEN
Score ← Score + 1
ENDIF