Computer Science, asked by kumarianshika445, 7 months ago

write the python programme to check the whether of a person is eligible for voting or not?​

Answers

Answered by sauravhathi
0

Explanation:

To check if a person is eligible to vote, you can use the following Python program:

#python

age = int(input("Enter your age: "))

if age >= 18:

 print("You are eligible to vote.")

else:

 print("You are not eligible to vote.")

This program prompts the user to enter their age and then checks if the age is greater than or equal to 18. If it is, it prints a message saying that the person is eligible to vote. If the age is less than 18, it prints a message saying that the person is not eligible to vote.

You can modify this program to include additional checks, such as checking for citizenship status or checking if the person has been registered to vote. You can also add additional logic to handle cases where the person is exactly 18 years old.

Similar questions