Vote eligibility checking system in python
Jun 15, 2021
Python Vote Eligibility,
5577 Views
This project is for absolute beginners who just read if-else statements recently.This project has vanilla python so no modules are being used.It's just 7 lines of code.Keep Reading!
Here is the code and read the comments for full information:
#Asking the user to enter his/her age.
age = int(input("What is your age?"))
# Printing message of the condition when the age is less than 18 and the user is not allowed to vote.
if age < 18:
print("Sorry you are not eligible to vote.")
# Printing message of the condition when the age is less than 18 and the user is allowed to vote.
if age >= 18:
print("You are eligible to vote.")