0
help me i am trying to create an program where we enter our age and it will reply us that we are eligible for voting or not but
a=input('enter your age to check your eligibiity:') print (a) if a>=18: print('Congratulations! You are eligible for voting.') else: print('Sorry ! You cannot vote')
3 Réponses
+ 2
Use int(input())
+ 2
age=int(input('your age:'))
def eligibility (x) :
if x>=18:
print ("you can vote")
else:
print ("you can't vote")
eligibility(age)
0
Thanks madie