Check the Fire Danger
The real fire danger, measured by experts, has a lot of factors. Two important factors are temperature and humidity. We’re going to measure these and if we think there might be a risk, we’re going to prompt the user to check the fire danger with their state or territory fire service.
We need to check if the temperature is above 20 degrees, or the humidity is less than 50%. If it is, we will warn the user.
Test your code here. If you’re getting an error it may be that your indentation is wrong.
These are conservative figures, we will show a lot of false positives, meaning that we will warn the user unnecessarily. In some situations, like this one, it’s better to have lots of false positives, than risk false negatives (when there’s actually danger, but we don’t tell them). In this case, all we’re doing is encouraging the user to check the fire danger with their state or territory fire service.
Let’s add an else statement that will tell the user when there’s a low risk.
Run your program. The words “Danger” or “Low risk” should scroll across the screen, depending on the temperature and humidity.
If you have an error, make sure you check your indentation.