Zoom
  • It's also important to recognize what is part of an If-statement.
  • Python uses indentation to convey this.
  • Notice that lines 4 and 5 are indented under the If-statement on line 3.
  • This means they are part of the If-statement and will be executed if sky_is_blue is True
  • Also notice line 7 is NOT indented, so it's not part of the If-Statement and will be executed regardless.
  • Run through the code to see this!
  • As a quick exercise, click the Edit Code button and change sky_is_blue to True and run it again!