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 | |
|---|---|---|
| 1basic.showNumber(input.temperature()) | AReads the temperature in degrees Celsius and scrolls the number across the micro:bit LED screen | |
| 2let temp = input.temperature() | Bbasic.showNumber(input.lightLevel()) | |
| 3Show the micro:bit's light sensor reading on the LED screen instead of the temperature | CStores the current temperature reading in a variable called temp so it can be used again later | |
| 4Store the temperature in a variable, then display the stored value | DThe brackets after input.temperature are missing, so the function is never called and no reading is returned. It should be input.temperature(). | |
| 5basic.showNumber(input.temperature) | EThe function name is misspelled as temprature. It must be spelled input.temperature() exactly or the code will not work. | |
| 6let temp = input.temprature() | Flet temp = input.temperature() basic.showNumber(temp) |
Complete each line of code by filling in the missing parts.
Shade in the letter of the line that contains an error.
input.temperature() — A micro:bit block that returns the temperature reading in degrees Celsius as a number. You can show it with basic.showNumber() or store it in a variable.basic.showNumber(input.temperature())let temp = input.temperature()let temp = input.temperature()
basic.showNumber(temp)let light = input.lightLevel()basic.showNumber(input.temperature())