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 screen = dark AND power light = on THEN fault = backlight | AThe IF conditions must be checked against the answers first. THEN gives the conclusion only after the conditions match. | |
| 2IF fever = yes AND rash = no THEN illness = flu | BA rule that fires only when both conditions match the user's answers, giving the conclusion that the backlight is faulty | |
| 3Tracing follows the user's answers through the rules in order until one rule gives the final conclusion | CThe rule cannot fire because one condition does not match the answer. AND needs every condition to be true. | |
| 4A different answer from the user can lead to a different conclusion | DRule 1: no match. Rule 2: match -> conclusion | |
| 5Rule fires: IF fever = yes AND rash = yes, user said rash = no | EA rule that does not fire if the user answers rash = yes, so the trace moves on to the next rule | |
| 6Trace: check the THEN part first, then the IF part | Fcough = yes -> flu, cough = no -> cold |
Complete each line of code by filling in the missing parts.
Shade in the letter of the line that contains an error.
trace an expert system — Follow the user's answers through the IF-THEN rules in order, checking which rules fire and which do not, until one rule gives the final conclusion.IF power = "off" THEN
advice ← "Plug it in"IF fever = "yes" AND cough = "yes"
THEN diagnosis ← "Flu"fever ← "no"
IF fever = "yes" THEN diagnosis ← "Flu"
// Rule does not fire, so check next ruleIF light = "on" THEN fault ← "Bulb"
ELSE IF light = "off" THEN fault ← "Fuse"IF fever = "yes" AND cough = "yes" THEN
OUTPUT "See a doctor"