1. if simplest.py
password = input("password: ") if password == "abcd": print("access granted")
number = 5 if number > 0: print("Stay positive!")
word = "Hi" #single equal sign = assignment of value on RIGHT of #the equals sign to the variable on the LEFT of the equals sign if word == "Hi": #double equal sign == comparison of two values: print("G'Day!")
print("Welcome to the movies.") age = int(input("How old are you?")) if (age < 13): print("You are not old enough to watch a movie.") print("Thanks for coming.") candyBarClosed = True if(candyBarClosed): print("Candy bar is not open.")