# if - do some code only IF some condition is true
# else do something else
age = int(input("What is your age? "))
if age >= 18:
print("You are old enough to vote.")
elif age < 4:
print("How can you even read and write at this age? You're amazing!")
else:
print("You must be 18+ to vote.")
Python Beginner Diary Day008: if statements
by
Tags:
Leave a Reply