Write a Python program that takes an age as input and determines whether a person is eligible to vote. If the age is 18 or above, print "You are eligible to vote." Otherwise, print "You are not eligible to vote yet."
Source Code
# Prompt the user to input their age
age = int(input("Enter your age: "))
# Check if the age is 18 or above
if age >= 18:
print("You are eligible to vote.")
else:
print("You are not eligible to vote yet.")
Output
Enter your age: 16
You are not eligible to vote yet.