Мой профиль
ACTIVITY 14 / 50

If it gets cold

Try as many times as you need

Let’s understand

if runs a block only when its condition is true. End the condition with a colon. Indent the lines inside the block by four spaces. Indentation is part of the language, not decoration.

Listen to the explanation

Example

water = 2
if water < 3:
    print("WATER")
YOUR MISSION

Read a temperature. If it is below 10, print HEAT. Otherwise print nothing.

I need a hint

Use temperature < 10. Indent print.

How to find an error
  1. Read the last line of the error message.
  2. Find the indicated line. Check quotes, parentheses and indentation.
  3. Change one thing and run again.

main.py

4 spaces

Your draft stays in this browser.

Result

Python
Your program’s output will appear here. Click Run.