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 | |
|---|---|---|
| 1REPEAT DISPLAY count count ← count + 1 UNTIL count > 5 | AREPEAT-UNTIL loop | |
| 2UNTIL count > 5 | BThe loop should close with UNTIL and its condition, not END UNTIL | |
| 3A loop guaranteed to run its body at least once | CChecks a condition after the loop body has run | |
| 4The keyword that marks the start of the loop body | DAssignment should use ←, not = | |
| 5count ← 0 REPEAT DISPLAY count count ← count + 1 END UNTIL count = 3 | EA loop that runs its body at least once before checking a condition | |
| 6n ← 1 REPEAT DISPLAY n n = n + 1 UNTIL n > 5 | FREPEAT |
Complete each line of code by filling in the missing parts.
Shade in the letter of the line that contains an error.
REPEAT ... UNTIL condition — A loop that repeats its instructions and checks the condition after each repetition, so the body always runs at least onceREPEAT
DISPLAY countREPEAT
DISPLAY count
UNTIL count > 5UNTIL count > 5A REPEAT-UNTIL loop is a post-test loopREPEAT-UNTIL loops always run at least once