Write a python program to determine the no. of people in a family who are eligible and not eligible
to vote.
(Note: The eligibility criteria to cast a vote is 18 years and above.)
The program should:
1. Accept the no. of members in the family (say, N) from the user.
2. Use iterative statements to,
Accept the name and age of each family member
After accepting the name and age of a person the program should immediately display a message
along with the name if that person can vote or not.
Based on the age entered, the program should keep a track of the no. of people eligible and not
eligible to vote in the family.
3. Finally display the count of people eligible and not eligible to cast a vote in the family with
appropriate messages.
Answers
Answered by
1
Answer:
# input age
age = int(input("Enter Age : "))
# condition to check voting eligibility
if age>=18:
status="Eligible"
else:
status="Not Eligible"
print("You are ",status," for Vote.")
Similar questions