What Kind of Day?
Emma names a day after its highest temperature: a hot day reaches 25 °C or more, a warm day 15 to 24 °C, and anything below 15 °C is a cold day. She also needs to know whether there was frost, which could hurt her strawberries: that's when the temperature dropped below 0 °C. At exactly 0 °C, there's no frost yet.
Add two lines below the report. Today's highest temperature is 17 °C and the lowest 5 °C, so the whole output is:
Lowest: 5 °C
Highest: 17 °C
Average: 10.3 °C
Day: warm
Frost: noWatch the boundaries: with 25 °C in the afternoon, the day is hot, and with 15 °C, it's still warm. And frost can come at any time of the day: with -3 °C in the evening, the program prints Frost: yes.
A tip: in the lesson on conditions, you split numbers into ranges with elseif. Remember that the order of the branches matters.
Instructions
Print what kind of day it was.
Below that, print whether there was frost.
Start programming for free
2/3