"if"

An example of the "if" function

age = input("What is your age?")

if age > str(30):
    print("Your getting up there...")
elif age >= str(20):
    print("Your still Young.")
elif age >= str(10):
    print("You lil thang you...")
else:
    print("Baby")

#empty question    
input("Do you like to drink?")

if age >= str(21):
    print("Go for it. Have fun!")
else:
    print("Nope. You are waaaay too young! Go home")

Revision #1
Created 16 November 2023 20:15:08 by Danicus
Updated 16 November 2023 20:19:06 by Danicus