Q:

Python | Input age and check eligibility for voting

belongs to collection: Python basic programs

0

Python | Input age and check eligibility for voting

All Answers

need an explanation for this answer? contact us directly to get an explanation for this answer

Program:

# 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.")

Output

Enter Age : 19
You are  Eligible  for Vote.

 

need an explanation for this answer? contact us directly to get an explanation for this answer

total answers (1)

Python basic programs

This question belongs to these collections

Similar questions


need a help?


find thousands of online teachers now
Python | Find largest of three number using nested... >>
<< Python | Some of the examples of simple if else...