Example of if-statement
Image of construction

if it_is_raining:
print("Stop Construction")
else:
print("Continue Construction")

  • In programs, there are ways for you to control the flow of execution.
  • In this book, you'll learn about If statements in Python!
  • If-statements simply allow you to execute code only if a certain condition is true.