Step 1 of 6

Step 1 · Read and run

Your first if

if makes a decision. It asks a question, and only runs the lines underneath when the answer is True.

Three things to notice:

  1. The line ends with a colon :.
  2. The line(s) that belong to the if are indented: pushed in by 4 spaces. (The Tab key does this in the editor.)
  3. The first line that isn't indented isn't part of the if, so it always runs.

Run it, then change temp to 18 and run it again.

Run the program to carry on.
weather.py

Output

Press Run to see what your program prints.