๐Ÿ“– Beginning Python Programming /
Module: Controlling logic flow

if...:

๐Ÿ“– Beginning Python Programming / Controlling logic flow / if...:

If condition example

score = 61

if score >= 60:
    print("Pass")
else:
    print("Fail")

Key points to use if condition.

  1. Make sure there is a colon at the end.
  2. Anything that depends on the condition is indented with 4 spaces.
# Giving the following variable
age = 28