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 | |
|---|---|---|
| 1sensor | AThe computer takes a reading of a physical quantity (heat) that a sensor has measured and stores it in a variable. | |
| 2temperature = read_sensor() | BA sensor is an input device, not an output device. It measures the environment and sends readings in to the computer. | |
| 3A sensor is an input device, so its readings go into the computer for processing. | CAn input device that measures a physical quantity, such as heat or light, from the environment and sends the readings to a computer or microprocessor. | |
| 4Sensors take continuous readings so a system can monitor and control without a person. | DA light sensor measures light, not sound. Sound is measured by an acoustic sensor. | |
| 5A sensor is an output device that shows data to the user. | EINPUT reading FROM sensor | |
| 6A light sensor measures the sound level in a room. | FWHILE TRUE reading ← sensor value ENDWHILE |
Complete each line of code by filling in the missing parts.
Shade in the letter of the line that contains an error.
sensor — An input device that measures a physical quantity, such as heat or light, from the environment and sends the readings to a computer or microprocessor.WHILE TRUE DO
temp ← READ(tempSensor)
ENDWHILEWHILE TRUE DO
light ← READ(lightSensor)
ENDWHILEIF temp > 30 THEN
OUTPUT "Fan on"
ENDIFreading ← READ(tempSensor)
OUTPUT readingIF temp < 18 THEN
heater ← ON
ENDIF