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 | |
|---|---|---|
| 1Count ← 0 | AThe counter is reset to 0 inside the loop, so it never builds up past 1. It must be set to 0 once, before the loop. | |
| 2Count ← Count + 1 | BAdds 1 to the counter each time it runs, no matter what the item's value is | |
| 3Count only the items that meet a condition, such as marks over 50 | CThis adds the item's value to the counter instead of adding 1. That is totalling, not counting. | |
| 4Count every item by adding 1 on each repeat of the loop | DFOR Index ← 1 TO 10 Count ← Count + 1 NEXT Index | |
| 5Count ← Count + Mark[Index] | ESets the counter to 0 before the loop starts, so nothing has been counted yet | |
| 6FOR Index ← 1 TO 10 Count ← 0 Count ← Count + 1 NEXT Index | FIF Mark[Index] > 50 THEN Count ← Count + 1 ENDIF |
Complete each line of code by filling in the missing parts.
Shade in the letter of the line that contains an error.
Count ← Count + 1 — Counting adds 1 to a counter each time something happens. Start the counter at 0, add 1 (not the item's value), and do it for every item or only for matches.Count ← 0
FOR Index ← 1 TO 10
Count ← Count + 1Count ← 0
FOR Index ← 1 TO 10
Count ← Count + 1FOR Index ← 1 TO 10
Count ← Count + 1
NEXT IndexIF Score > 50 THEN
Count ← Count + 1
ENDIFIF Colour = "Red" THEN
Count ← Count + 1
ENDIF