Using knowledge in phyton it is possible to write code that uses program should print a nice message telling the user if they are eligible to vote.
def is_eligible(age, citizenship, prison):
# Converting the inputs into lower for validation
citizenship = citizenship.lower()
prison = prison.lower()
# 18+ Canadian and do not live in prison can vote
if(age >= 18 and prison == "yes" and (citizenship == "canada" or citizenship == "Canadian")):
return True
return False
# Implement your I/O here
# getting required inputs from user
citizenship = input("Please Enter your Citizenship: ")
prison = input("Please Enter if you are in prison YES/NO: ")
age = int(input("Please Enter your Age: "))
is_eligible = is_eligible(age, citizenship, prison)
if is_eligible:
print("Congratulations, You are eligible to Vote!!")
else:
print("Sorry, You can't Vote")
See more about python at brainly.com/question/18502436
#SPJ1