Making age eligiblity checker with If-else condition statement in Python

 SO NOW WE ARE GOING TO LEARN IF ELSE CONDITIONS IN PYTHON LANGAUAGE .

WE WILL MAKE A SIMPLE AND USEFUL PROGRAM TO CHECK ELIGIBILITY .


# Driving eligibility checker

print("Enter your age")

age = int(input()) # Typecasting string into integer and taking input of users age

if age>18 and age<101 : # if this condition is true then it will execute the print .

print("You Can drive")

elif age>7 and age<18 : #elif this condition is true then it will execute the print .

print("You cannot drive")

elif age==18 :

print("Come for physical fitness test")

else:

print("Enter a valid age..!")

"""So this was a very simple but useful tool for checking eligibility for driving"""



Comments