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 | |
|---|---|---|
| 1age >= 13 AND has_permission = Yes | AOR was used when both conditions must be true. It should be AND, because OR lets someone through with only one part true. | |
| 2is_weekend = Yes OR is_holiday = Yes | BOne diamond that sends the flow down Yes when at least one part is true | |
| 3Two diamonds in a row, where both answers must be Yes to reach the action, can be replaced by one AND diamond | COne diamond that sends the flow down Yes only when both parts are true | |
| 4NOT reverses a question so the Yes path is taken when the original answer would have been No | Dscore >= 50 AND attendance >= 80 | |
| 5Diamond: age >= 13 OR has_permission = Yes (meant to need both) | EAND was used when only one condition needs to be true. It should be OR, because AND needs both to be true at once. | |
| 6Diamond: is_raining = Yes AND is_snowing = Yes (meant to need either) | FNOT (is_logged_in = Yes) |
Complete each line of code by filling in the missing parts.
Shade in the letter of the line that contains an error.
age >= 13 AND has_permission = Yes — A combined condition in one decision diamond. AND needs both parts true, OR needs just one, NOT reverses it. One diamond with AND matches two diamonds in a row.Decision: age >= 13 AND permission = YesDiamond A: member = Yes? Yes -> Discount
Diamond B: coupon = Yes? Yes -> Discount
One: member = Yes OR coupon = YesDecision: NOT is_rainingDiamond 1: age >= 13? Yes -> Diamond 2
Diamond 2: permission = Yes? Yes -> Enter
One diamond: age >= 13 AND permission = YesDecision: temp < 10 OR temp > 35