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
Post a Comment