Skip to main content

Program To Read Person's Age From Keyboard And Display Whether Is Eligible For Voting Or Not

· One min read
Kaustubh Kulkarni
# Write a program to read person's age from keyboard and display whether is eligible for voting or not
def isEligible(age):
if age>18:
print("Eligible for voting")
print("Not eligible for voting")
isEligible(int(input("Enter Age : ")))
Enter Age : 19
Eligible for voting
Enter Age : 13
Not eligible for voting