Advertisement
Guest User

Untitled

a guest
Apr 27th, 2017
139
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.46 KB | None | 0 0
  1. alcohol_level_string = input("Enter blood alcohol level (mg/100ml): ")
  2. alcohol_level = float(alcohol_level_string)
  3. age_string = input("Enter age in years: ")
  4. age = float(age_string)
  5. if age >= 20 and alcohol_level < 30 :
  6. print("You're allowed to drive")
  7. elif ((alcohol_level <= 49 or alcohol_level <= 30) and age > 19):
  8. print("You're legally allowed to drive, but please don't")
  9. elif age < 20 or alcohol_level >= 50 :
  10. print ("You're not allowed to drive")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement