A program that accepts user input then determines whether they can drive or not

 

try:
    age = int(input("Your age: "))
    if age>18 and age<=100:
        print("You can drive!")
    elif age<18:
        print("Sorry! You cannot drive!")
    elif age==18:
        print("Come on site and take the test.")
    elif age>100 and age<200:
        print("You are overage. Sorry!")
    else:
        print("Humans do not have this age size")
except:
    print("Only numeric input acceptable")



Comments

Popular posts from this blog

Quotation marks to wrap an element in HTML

What is the difference between iostream and iostream.h in cpp?

The Basic Structure of a Full-Stack Web App