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 temp < 20 THEN heater ← ON | Aheater ON: 17 -> 19 -> 21 | |
| 2WHILE true: read sensor again | BThe loop repeats continuously, so the next reading shows the effect the actuator has had. | |
| 3The heater is on and warms the room, so the next temperature reading is higher than the last one. | CThe sensor is read only once and never checked again, so there is no feedback. The system cannot notice the target has been reached or switch the actuator off. | |
| 4When the reading reaches the target, the microprocessor switches the actuator off. | DThe heater is on but the reading never changes. With feedback, the actuator's effect should change the next sensor reading, so the temperature should rise each loop. | |
| 5Loop 1: 17 | Loop 2: 17 | Loop 3: 17 (heater ON) | EIF temp >= 21 THEN heater ← OFF | |
| 6Read sensor once, then heater ON forever | FThe microprocessor compares the sensor reading with the stored value and switches the actuator on when the room is too cold. |
Complete each line of code by filling in the missing parts.
Shade in the letter of the line that contains an error.
feedback — When an actuator's effect changes the next sensor reading, so the system keeps adjusting itself until the stored value is reached, e.g. a heater warms the room until the target.WHILE TRUE
temp ← ReadSensor()
IF temp < 20 THEN heater ← ONtemp ← ReadSensor()
IF temp < 20 THEN
heater ← ONIF temp >= 20 THEN
heater ← OFF
ENDIFheater ← ON
WAIT 1
temp ← ReadSensor()REPEAT
temp ← ReadSensor()
UNTIL temp >= target