Advertisement
ALEXANDAR_GEORGIEV

world_snooker_champ

May 29th, 2022
45
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 1.26 KB | None | 0 0
  1. price = {
  2.     'quarter_final': {
  3.         'standard': 55.50,
  4.         'premium': 105.20,
  5.         'vip': 118.90
  6.     },
  7.     'semi_final': {
  8.         'standard': 75.88,
  9.         'premium': 125.22,
  10.         'vip': 300.40
  11.     },
  12.     'final': {
  13.         'standard': 110.10,
  14.         'premium': 160.66,
  15.         'vip': 400.0
  16.     }
  17. }
  18. stage = input()     # Етап
  19. indx_stage = None
  20. if stage == 'Quarter final': indx_stage = 'quarter_final'
  21. elif stage == 'Semi final': indx_stage = 'semi_final'
  22. elif stage == 'Final': indx_stage = 'final'
  23. type_ticket = input()
  24. indx_type_ticket = type_ticket.lower()
  25. count_ticket = int(input())
  26. pictures = input()
  27. # price_picture = 40
  28. ticket_price = price[indx_stage][indx_type_ticket]
  29. total_amount = ticket_price * count_ticket
  30. net_amount = 0
  31. # print(ticket_price)
  32.  
  33. if total_amount > 4000:
  34.     net_amount = total_amount - total_amount * 25 / 100
  35.     # price_picture = 0
  36. elif total_amount > 2500:
  37.     if pictures == 'Y':
  38.         net_amount = total_amount - total_amount * 10 / 100 + 40 * count_ticket
  39.     else:
  40.         net_amount = total_amount - total_amount * 25 / 100
  41. else:
  42.     if pictures == 'Y':
  43.         net_amount = total_amount + 40 * count_ticket
  44.     else:
  45.         net_amount = total_amount
  46.  
  47. print(f'{net_amount:.2f}')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement