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 reading < 22 THEN heater ON | A18 is not greater than 22. The reading is too low, so the comparison should use < to match the heater being turned on. | |
| 2IF reading > 22 THEN heater OFF | BThe microprocessor sees the reading is above the stored value, so it switches the heater off | |
| 3The designer sets the target temperature once. The microprocessor keeps it as a stored value. | CThe microprocessor sees the reading is below the stored value, so it switches the heater on | |
| 4Worked example: a reading of 18 is compared with a stored value of 22. It is too low, so the heater turns on. | DIF 18 < 22 THEN heater ON | |
| 5IF 18 > 22 THEN heater ON | EtargetTemp <- 22 | |
| 6IF reading = 22 THEN heater ON | FA reading equal to the stored value is on target, so the heater should not be switched on. The heater should come on when the reading is too low (< 22). |
Complete each line of code by filling in the missing parts.
Shade in the letter of the line that contains an error.
stored value — A pre-set value, such as a target temperature, kept in the microprocessor. It compares each digital sensor reading with it to decide if the reading is too high, too low or on target.target ← 22
reading ← 18
IF reading < target THEN heater_ontarget ← 22
reading ← 25
IF reading > target THEN cooler_onIF reading = target THEN
OUTPUT "On target"target ← 22
IF reading < target THEN
heater ← ON// Designer sets target to 22
target ← 22
IF reading < target THEN heater_on