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 | |
|---|---|---|
| 1INPUT Name | AA siren and a flashing light are outputs. The inputs are the data going in, such as a reading from a motion sensor. | |
| 2READFILE("scores.txt", Line) | BTemp ← ReadSensor("temperature") | |
| 3An input can be a reading from a sensor, such as a temperature sensor in a greenhouse | CThese are outputs or results of processing, not inputs. Inputs are the raw data that goes in, such as each mark entered. | |
| 4Listing the inputs in a scenario: a quiz asks for a player name and an answer | DReads one line of data from a stored file into the variable Line | |
| 5Inputs: total score, average mark, grade | ETakes data typed in by the user and stores it in the variable Name | |
| 6Inputs for an alarm: siren sounds, light flashes | FINPUT PlayerName INPUT Answer |
Complete each line of code by filling in the missing parts.
Shade in the letter of the line that contains an error.
input — Data that goes into a system from a user, a sensor or a file, such as a typed name, a temperature reading or a line read from a stored file.OUTPUT "Enter your name"
INPUT NameOPENFILE "scores.txt" FOR READ
READFILE "scores.txt", LineOPENFILE "scores.txt" FOR READ
READFILE "scores.txt", LineOUTPUT "Enter your age"
INPUT Age// A sensor reading is an input
INPUT Temp