If Statements
Temperature Sensor
Levels
You're a newly minted software engineer at a company that designs smart thermostats - which help automate the temperature of your home. They've discovered that rarely the temperature sensor may fail in the thermostat and give very high temperature readings.
Your first goal at the company is to detect this failure and print an error if the temperature reading is too high. The program should read the current temperature reading (in Celsius) from the user.
- If the temperature reading is >50, the program should print "Error: Temperature Sensor Failure"
- Otherwise, the program should print nothing
Experiments are available to members.
Become a Member