# checking eligibility for vote

def check_eligibility(age):
    if age >= 18:
        print("You are eligible to vote.")
    else:
        years_left = 18 - age
        print("You are not eligible to vote. You have", years_left, "years left to be eligible.")

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

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: