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 | |
|---|---|---|
| 1infra-red sensor | Aif infraRedSensor = HIGH then open_door() | |
| 2if infraRedSensor = HIGH then sound_alarm() | BA burglar alarm that sounds when the sensor detects heat or movement from an intruder | |
| 3An automatic door uses an infra-red sensor to detect a person's body heat or a broken beam, then opens | CThe alarm should sound when the sensor detects heat or movement (HIGH), not when nothing is detected (LOW). | |
| 4The data an infra-red sensor captures is heat or movement | DAn infra-red sensor detects infra-red radiation (heat), not visible light. It works in the dark because it senses heat, as in night vision. | |
| 5An infra-red sensor detects visible light so it works in the dark | Edata ← infraRedSensor.read() | |
| 6if infraRedSensor = LOW then sound_alarm() | FA sensor that detects infra-red radiation, such as the heat given off by people and objects |
Complete each line of code by filling in the missing parts.
Shade in the letter of the line that contains an error.
infra-red sensor — A sensor that detects infra-red radiation, such as heat given off by people and objects, or a broken infra-red beam. Used in burglar alarms and automatic doors.IF beamBroken = TRUE THEN
OUTPUT "Alarm"
ENDIFheat ← INPUT FROM infraredSensor
OUTPUT heatIF heat > 30 THEN
OUTPUT "Person detected"
ENDIFIF beamBroken = TRUE THEN
OUTPUT "Open door"
ENDIFIF motion = TRUE THEN
OUTPUT "Alarm on"
ENDIF