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 | |
|---|---|---|
| 1NEXT Counter | ACloses a FOR loop whose counter variable is Counter | |
| 2ENDWHILE | BNEXT uses a different identifier (Total) from the FOR loop counter (Count). It should be NEXT Count. | |
| 3A REPEAT loop must end with UNTIL and a condition, not with ENDWHILE | CCloses a WHILE ... DO loop | |
| 4A nested IF needs its own ENDIF, so two IF statements need two ENDIF keywords | DIF Mark >= 50 THEN IF Mark >= 80 THEN OUTPUT "Distinction" ENDIF ENDIF | |
| 5FOR Count ← 1 TO 10 OUTPUT Count NEXT Total | EENDWHILE has been used to close a REPEAT loop. It should be UNTIL with a condition, such as UNTIL Answer = 5. | |
| 6REPEAT INPUT Answer ENDWHILE | FREPEAT INPUT Number UNTIL Number > 0 |
Complete each line of code by filling in the missing parts.
Shade in the letter of the line that contains an error.
ENDIF NEXT ENDWHILE UNTIL — Closing keywords that end IF, FOR, WHILE and REPEAT. Each one must match its opening statement. A missing or mismatched closing keyword is an error.FOR Count ← 1 TO 5
OUTPUT Count
NEXT CountIF Score > 50 THEN
OUTPUT "Pass"
ENDIFWHILE Total < 100 DO
Total ← Total + 5
ENDWHILEREPEAT
INPUT Guess
UNTIL Guess = 7IF Age > 0 THEN
IF Age > 9 THEN OUTPUT "Big" ENDIF
ENDIF