Python Quiz 2 - "Using if, elif statements to see if you're eligible to drive or not"

 Python Quiz 2 -

"Using if, elif, else statements to see if you're eligible to drive or not"

CODE

print("Your age is?")
var2 = int(input())
if var2<=7:
print("Age is definetly not eligible for driving")

elif var2<18:
print("No. You can not drive.")

elif var2==18:
print("We will think about you and you have to come here for inspection.")

elif var2>=70:
print("Age is definetly not eligible for driving")

else:
print("Yes. You can drive.")

Comments

Popular posts from this blog

Python Exercise 7 --- "Snake, Water, Gun"

Python Tutorial 38 --- "Self & __init__() (Constructors)(OOPS 3)"

Python Exercise 4 --- "Number Guessing Game"