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 | |
|---|---|---|
| 1Diamond: Is guess = secret? | AThe counter update is on one branch only, so it does not run on every pass. | |
| 2Yes path and No path both join, then arrow back to loop test | BOnly one path returns to the loop. The paths must both rejoin and then go back to the loop test together. | |
| 3In a higher or lower game, the counter goes up after the decision, once both paths have rejoined | CDiamond: guess <> secret? -> Yes: Ask for guess, decision, join, back to this diamond | |
| 4The loop test asks if the game should keep going, and the arrow from the end of the loop body returns to it | DIs guess too high? -> Yes: Show Lower / No: Show Higher -> join -> count <- count + 1 | |
| 5Yes path of the decision loops back to the loop test, but the No path ends the flowchart | EA decision diamond inside the loop body that is asked again on every pass through the loop | |
| 6Count <- count + 1 is placed on the Yes path only, so it is skipped when the answer is No | FBoth branches rejoin at one point before the flow returns to the loop condition |
Complete each line of code by filling in the missing parts.
Shade in the letter of the line that contains an error.
decision inside a loop — A decision diamond on the loop path is asked on every pass. Its Yes and No paths both rejoin before the arrow returns to the loop test.A decision in a flowchart is a diamondGuess too high? Yes: Say Lower
Guess too high? No: Say HigherSay Lower or Say Higher
count ← count + 1
Arrow back to the loop testBoth paths rejoin before the arrow backThe diamond is asked on every loop pass