1. Hot or mild in one line
Write code Easy ✓ CompletedUsing a conditional expression on a single line, set weather to "hot" when temperature is above 30 and to "mild" otherwise. Then print weather.
Try a few other temperatures, then set it back to 31 before pressing Check.
temperature = 31
# one line: weather is "hot" if temperature > 30, otherwise "mild"
temperature = 31
weather = "hot" if temperature > 30 else "mild"
print(weather)