Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- alcohol_level_string = input("Enter blood alcohol level (mg/100ml): ")
- alcohol_level = float(alcohol_level_string)
- age_string = input("Enter age in years: ")
- age = float(age_string)
- if age >= 20 and alcohol_level < 30 :
- print("You're allowed to drive")
- elif ((alcohol_level <= 49 or alcohol_level <= 30) and age > 19):
- print("You're legally allowed to drive, but please don't")
- elif age < 20 or alcohol_level >= 50 :
- print ("You're not allowed to drive")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement