ChamplainTechJournals/python-csi160/week04/week04_labs/croce_week04_lab_01.py
2025-04-19 23:42:08 -04:00

14 lines
329 B
Python

#1. Implement a voting test. The user enters their age and then the program prints either,
# “You must be 18 to vote” or “You are of voting age”.
def voting_test():
age = int(input("age: "))
if age >= 18:
print("You are of voting age")
else:
print("You must be 18 to vote")
voting_test()