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 | |
|---|---|---|
| 1IF age >= 13 AND hasPermission = TRUE | AThe paths are swapped. A student who fails the first test still gets checked again, and passing the first test skips the second test. | |
| 2Diamond 1 No path and Diamond 2 No path both point to the same box | BTwo decisions in a row in a flowchart: the first checks age, and only its Yes path leads to the permission check. | |
| 3Only Yes then Yes reaches the action, which matches a single AND condition in pseudocode | CIF temp > 20 AND raining = FALSE THEN OUTPUT "Go to the oval" ENDIF | |
| 4The second diamond is only reached when the first answer is Yes, so the two tests sit in a row | DWhichever test fails, the flow carries on to the same next step, so the action is skipped either way. | |
| 5Diamond 1 Yes goes to the action, Diamond 2 is drawn beside it with its own Yes also going to the action | EIF score >= 50 AND attendance >= 80 THEN OUTPUT "Pass" ENDIF | |
| 6Diamond 1 No goes to the second diamond, and Diamond 1 Yes goes to the action | FThis draws OR, not AND. Either diamond can reach the action by itself, so only one condition has to be true. |
Complete each line of code by filling in the missing parts.
Shade in the letter of the line that contains an error.
IF A AND B — In a flowchart, AND is two diamonds in a row: only Yes then Yes reaches the action, and a No from either diamond goes to the same next step.IF age >= 13 AND parent = "Yes" THEN
DISPLAY "Join"
ENDIFIF score >= 50 AND attendance >= 80 THEN
DISPLAY "Pass"
ENDIFIF raining = "No" AND temp > 15 THEN
DISPLAY "Picnic"
ENDIFIF age >= 13 THEN
IF parent = "Yes" THEN
DISPLAY "Join"IF hasTicket = "Yes" AND seats > 0 THEN
DISPLAY "Enter"
ENDIF