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 1: age < 12? Yes goes to 'Child price'. No goes to Diamond 2: age > 65? Yes goes to 'Child price'. | AThe two Yes arrows go to different actions. For OR, both Yes arrows must reach the same action box. | |
| 2Diamond 1: day = 'Sat'? No goes to Diamond 2: day = 'Sun'? No goes past the action to the next step. | BThe action is skipped only when both answers are No, because neither condition was true. | |
| 3The second diamond sits only on the No path of the first diamond, because it is only needed if the first test failed. | CDiamond 1 No arrow → Diamond 2 | |
| 4The flowchart for IF A OR B THEN is drawn with two diamonds, and the Yes arrows from both diamonds go to the same action box. | DThe second diamond is on the Yes path, which is how AND is drawn. For OR, it must be on the No path of the first diamond. | |
| 5Diamond 1: temp > 35? Yes goes to 'Stay inside'. Diamond 2: rain = 'yes'? Yes goes to a different box 'Take umbrella'. | EThis draws IF age < 12 OR age > 65. Both Yes arrows reach the same action box. | |
| 6Diamond 1: score > 90? Yes goes to 'Award'. Yes from Diamond 1 also leads to Diamond 2: attendance = 100? Yes goes to 'Award'. | FIF A OR B THEN action ENDIF |
Complete each line of code by filling in the missing parts.
Shade in the letter of the line that contains an error.
IF A OR B THEN — In a flowchart, OR is two diamonds whose Yes arrows both reach the same action. The second diamond sits on the first's No path. The action is skipped only if both are No.IF age < 12 OR age > 64 THEN
OUTPUT "Discount"
ENDIFD1: Is age < 12? Yes -> Discount
D1: No -> D2: Is age > 64?
D2: Yes -> Discount, No -> SkipD1: Is score < 0? Yes -> Error
D1: No -> D2: Is score > 100?
D2: Yes -> Error, No -> ContinueIF temp > 35 OR temp < 5 THEN
OUTPUT "Stay inside"
ENDIFD1: Is temp > 35? Yes -> Warn
D1: No -> D2: Is temp < 5?
D2: Yes -> Warn, No -> End