AdvertisementYour brand could be hereYour brand hereOn every Darslab page · students, parents and teachersinfo@darslab.comAsk for pricesPricesinfo@darslab.com
☰ Year plan · Computing

Sensors make decisions

Week 8 · Unit 7.2: Decomposing problems · 3 lessons
Answers are for parents and teachers.
1
Name three devices that use a sensor. For each one write what the sensor measures and what the output is.
2
Draw the flowchart for this plan: if the temperature is below 10 degrees, scroll Cold. Otherwise scroll OK.
3
Write what the board shows when the light level is 149, 150 and 151.
Python
1from microbit import *
2while True:
3    if display.read_light_level() >= 150:
4        display.show(Image.YES)
5    else:
6        display.show(Image.NO)
4
Find the mistake in this program and write the correct line.
Python
1from microbit import *
2while True:
3    if temperature() > 25:
4        display.scroll("Hot")
5    else
6        display.scroll("OK")
5
A plan says: “warn me when the temperature is 30 or more.” Which operator is correct, > or >=? Explain what happens at exactly 30 degrees with the other one.