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 | AAdds 1 to the counter each time the thing being counted happens | |
| 2Count <- Count + 1 | BIF Mark >= 50 THEN Count <- Count + 1 ENDIF | |
| 3To count only the marks that are 50 or more, put the counter increase inside an IF inside the loop | CCount is set to 0 inside the loop, so it resets on every repeat and never counts beyond 1. Count <- 0 must go before the loop. | |
| 4To count every repeat of a loop, the counter increase goes in the loop with no IF | DThe counter increase is outside any IF, so it counts every repeat instead of only values that meet a condition. It should be placed inside an IF. | |
| 5FOR N <- 1 TO 10 Count <- 0 Count <- Count + 1 NEXT N | EFOR N <- 1 TO 10 Count <- Count + 1 NEXT N | |
| 6Count <- 0 WHILE Count < 5 DO Count <- Count + 1 ENDWHILE | FSets the counter to zero before the loop starts, so counting begins from nothing |
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 — Adds 1 to the counter each time the thing being counted happens. Set Count <- 0 before the loop, and put this inside the loop (inside an IF to count only some values).Count <- 0
FOR Num <- 1 TO 10
Count <- Count + 1Count <- 0
WHILE Num < 10 DO
Count <- Count + 1FOR Num <- 1 TO 10
IF Num > 5 THEN
Count <- Count + 1INPUT Mark
IF Mark >= 50 THEN
Count <- Count + 1IF Score = 100 THEN
Count <- Count + 1
ENDIF