web viewtemperature sensor. the microbit has an onboard temperature sensor. add a...

4
Temperature Sensor The Microbit has an onboard temperature sensor Add a ‘forever’ loop Add a variable, rename it temperature. Get this variable to measure temperature from the Microbit Now it needs to show a number This number needs to be the Temperature variable Challenge 1. Add a message after the temperature e.g. ‘degrees Celcius’ 2. The temperature in Norway is approximately 10 degrees colder than here. Write a program to display the temperature in Norway 3. The temperature in Spain is approximately 5 degrees hotter than here. Write a program to display the temperature in Spain 4. The temperature in Daeth Valley, Califormia is approximately twice the temperature here. Write a program to display the temperature in Death Valley 5. Write a program using if statements so that if the temperature is above 25 then it says ‘It is warm’, else it says ‘It is not hot’ 6. Write a program using if statements so that if the temperature is above 25 then it says ‘It is hot’, if it is below 10 it says ‘It is cold’, else it says ‘It is warm’

Upload: trinhdat

Post on 07-Feb-2018

221 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: Web viewTemperature Sensor. The Microbit has an onboard temperature sensor. Add a ‘forever’ loop. Add a variable, rename it temperature. Get this variable to

Temperature Sensor

The Microbit has an onboard temperature sensor

Add a ‘forever’ loop

Add a variable, rename it temperature. Get this variable to measure temperature from the Microbit

Now it needs to show a number

This number needs to be the Temperature variable

Challenge

1. Add a message after the temperature e.g. ‘degrees Celcius’2. The temperature in Norway is approximately 10 degrees colder than here. Write a program

to display the temperature in Norway3. The temperature in Spain is approximately 5 degrees hotter than here. Write a program to

display the temperature in Spain4. The temperature in Daeth Valley, Califormia is approximately twice the temperature here.

Write a program to display the temperature in Death Valley5. Write a program using if statements so that if the temperature is above 25 then it says ‘It is

warm’, else it says ‘It is not hot’6. Write a program using if statements so that if the temperature is above 25 then it says ‘It is

hot’, if it is below 10 it says ‘It is cold’, else it says ‘It is warm’

Page 2: Web viewTemperature Sensor. The Microbit has an onboard temperature sensor. Add a ‘forever’ loop. Add a variable, rename it temperature. Get this variable to

Answers

Page 3: Web viewTemperature Sensor. The Microbit has an onboard temperature sensor. Add a ‘forever’ loop. Add a variable, rename it temperature. Get this variable to