if condition:
if and else condition
nested if and else if condition:
Question:
If the temperature is within the range of 10 to 100 (inclusive):
Display "Temperature is very hot" if the temperature is 40 or higher.
Display "Temperature is hot" if the temperature is between 30 and 39.
Display "Temperature is warm" if the temperature is between 20 and 29.
Display "Temperature is cold" if the temperature is between 10 and 19.
Top comments (0)