BbJLeB

Untitled

Apr 18th, 2019
428
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.66 KB | None | 0 0
  1. import math
  2. fantasy_price = 14.90
  3. horor_price = 9.80
  4. romance_price = 4.30
  5.  
  6. wish_money = float(input())
  7. fantasy_peace = int(input())
  8. horor_peace = int(input())
  9. romance_peace = int(input())
  10.  
  11. fantasy = fantasy_peace * fantasy_price
  12. horor = horor_peace * horor_price
  13. romance = romance_peace * romance_price
  14.  
  15. win_money = fantasy + horor + romance
  16. procent = win_money * 0.20
  17. all_money = win_money - procent
  18. donate = (all_money - wish_money) * 0.1
  19. need_money = all_money - wish_money
  20. if all_money > win_money:
  21.     print(f"{donate} leva donated.")
  22.     print(f"Sellers will receive {math.floor(donate)}  leva.")
  23.  
  24. else:
  25.     print(f"{(need_money):.2f} money needed.")
Advertisement
Add Comment
Please, Sign In to add comment