Create an algorithm that will able to read the age of an individual and determine if it qualified to vote or not. The qualifying age to vote is 18 and above. If the age is 18 below, display "too young!". Note that there is no such age as 0 or negative however display "Invalid age" if age is above 100 display "Out of range".
age=input("Input your age")
if age <= 0
print("Invalid age")
if 0 < age < 18
print("Too young!")
if age > 100
print("Out of range")
Comments
Leave a comment