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 INPUT Guess UNTIL Guess = 7 | AThe exit directions are the wrong way round. For REPEAT ... UNTIL, YES must leave the loop and NO must go back to the body. | |
| 2Guess = 7? NO -> back to INPUT Guess | BIn the flowchart, the INPUT Guess process box comes first, then the decision Guess = 7? placed after it, so the body always runs at least once. | |
| 3The YES path from the decision leaves the loop, because the UNTIL condition is now TRUE | CREPEAT Count ← Count + 1 UNTIL Count = 10 | |
| 4A REPEAT loop flowchart has the exit direction opposite to a WHILE loop: YES exits, NO loops back | DREPEAT INPUT Num UNTIL Num > 0 OUTPUT Num | |
| 5Flowchart: decision Age >= 18? drawn BEFORE the body INPUT Age, with YES going into the body | EThe NO flow line goes back up to the start of the loop body, so the loop repeats while the UNTIL condition is not yet TRUE. | |
| 6Flowchart: after INPUT Pin, decision Pin = 1234? with YES going back to INPUT Pin and NO leaving the loop | FThe decision is drawn before the body, which makes a WHILE loop. In a REPEAT loop the body comes first and the decision comes after it. |
Complete each line of code by filling in the missing parts.
Shade in the letter of the line that contains an error.
REPEAT ... UNTIL — In a flowchart, the loop body comes first, then a decision. NO goes back to the body, YES leaves the loop, so the body runs at least once.REPEAT
INPUT Number
UNTIL Number > 0Number > 0?
NO -> back to INPUT NumberNumber > 0?
YES -> leave the loopREPEAT
INPUT Mark
UNTIL Mark >= 0 AND Mark <= 100REPEAT loop exits when condition is TRUE