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 | |
|---|---|---|
| 11. Get the bowl 2. Pour in the cereal | AThis is a loop, not a branch. It repeats a step until a condition is true. It does not choose between paths. | |
| 2REPEAT 5 TIMES: Kick the ball | BIF it is raining THEN take an umbrella ELSE wear a hat | |
| 3A branch is a decision that picks which steps to follow | CSteps done in order ARE a sequence. Every algorithm has a sequence, even when it also has branches and loops. | |
| 4An algorithm can mix all three parts: a sequence, a branch and a loop | DA sequence: steps done one after the other in order | |
| 5REPEAT UNTIL the bin is full: Put in a bottle (labelled as a branch) | EA loop: a step that is repeated more than once | |
| 6Steps 1, 2 and 3 are all done in order, so this algorithm has no sequence | F1. Open the gate 2. REPEAT 3 TIMES: IF dog is hungry THEN feed it |
Complete each line of code by filling in the missing parts.
Shade in the letter of the line that contains an error.
sequence, branch, loop — Most algorithms mix steps in order (sequence), decisions (branch) and repeats (loop). When you read an algorithm, you can label each part and explain it in your own words.walk to the door
IF the door is shut THEN
open the doorREPEAT 10 TIMES
IF the cup is empty THEN
fill the cupREPEAT UNTIL the bag is full
IF the apple is ripe THEN
pick the appleIF it is raining THEN
take an umbrella
ELSE wear a capStep 1: wake up // sequence
REPEAT 3 TIMES // loop
IF tired THEN sleep // branch