Advertisement
simeonshopov

luggage tax (late jly exam)

Nov 4th, 2019
154
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.48 KB | None | 0 0
  1. width = int(input())
  2. height = int(input())
  3. depth = int(input())
  4. ticket = input()
  5. tax = 0
  6. luggage = width * height * depth
  7.  
  8. if luggage < 50:
  9.   tax = 0
  10. else:
  11.   if 50 <= luggage <= 100:
  12.     if ticket == "true":
  13.       tax = 0
  14.     else:
  15.       tax = 25
  16.   elif 100 < luggage <= 200:
  17.     if ticket == "true":
  18.       tax = 10
  19.     else:
  20.       tax = 50
  21.   elif 200 < luggage <= 300:
  22.     if ticket == "true":
  23.       tax = 20
  24.     else:
  25.       tax = 100
  26.  
  27. print(f"Luggage tax: {tax:.2f}")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement