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:
- The line ends with a colon
:. - The line(s) that belong to the
ifare indented: pushed in by 4 spaces. (The Tab key does this in the editor.) - 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.