Advertisement
Spocoman

01. Match Tickets

Dec 22nd, 2021 (edited)
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.48 KB | None | 0 0
  1. budget = float(input())
  2. category = input()
  3. people = int(input())
  4.  
  5. if people <= 4:
  6.     budget *= 0.25
  7. elif people <= 9:
  8.     budget *= 0.4
  9. elif people <= 24:
  10.     budget *= 0.5
  11. elif people < 50:
  12.     budget *= 0.6
  13. else:
  14.     budget *= 0.75
  15.  
  16. if category == 'VIP':
  17.     budget -= 499.99 * people
  18. else:
  19.     budget -= 249.99 * people
  20.  
  21. if budget >= 0:
  22.     print(f'Yes! You have {budget:.2f} leva left.')
  23. else:
  24.     print(f'Not enough money! You need {abs(budget):.2f} leva.')
  25.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement