Advertisement
bl00dt3ars

World Snooker Championship

Oct 25th, 2020
159
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 1.08 KB | None | 0 0
  1. stage = input()
  2. ticket_type = input()
  3. ticket_num = int(input())
  4. photo = input()
  5. price = 0
  6. photo_price = 0
  7.  
  8. if stage == "Quarter final":
  9.     if ticket_type == "Standard":
  10.         price = 55.50 * ticket_num
  11.     elif ticket_type == "Premium":
  12.         price = 105.20 * ticket_num
  13.     else:
  14.         price = 118.90 * ticket_num
  15. elif stage == "Semi final":
  16.     if ticket_type == "Standard":
  17.         price = 75.88 * ticket_num
  18.     elif ticket_type == "Premium":
  19.         price = 125.22 * ticket_num
  20.     else:
  21.         price = 300.40 * ticket_num
  22. elif stage == "Final":
  23.     if ticket_type == "Standard":
  24.         price = 110.10 * ticket_num
  25.     elif ticket_type == "Premium":
  26.         price = 160.66 * ticket_num
  27.     else:
  28.         price = 400 * ticket_num
  29.  
  30. if photo == "Y":
  31.     photo_price = ticket_num * 40
  32.     if price > 4000:
  33.         price *= 0.75
  34.     elif price > 2500:
  35.         price = (price * 0.9) + photo_price
  36.     else:
  37.         price = price + photo_price
  38. else:
  39.     if price > 4000:
  40.         price *= 0.75
  41.     elif price > 2500:
  42.         price *= 0.9
  43.  
  44. print(f"{price:.2f}")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement