Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import math
- fantasy_price = 14.90
- horor_price = 9.80
- romance_price = 4.30
- wish_money = float(input())
- fantasy_peace = int(input())
- horor_peace = int(input())
- romance_peace = int(input())
- fantasy = fantasy_peace * fantasy_price
- horor = horor_peace * horor_price
- romance = romance_peace * romance_price
- win_money = fantasy + horor + romance
- procent = win_money * 0.20
- all_money = win_money - procent
- donate = (all_money - wish_money) * 0.1
- need_money = all_money - wish_money
- if all_money > win_money:
- print(f"{donate} leva donated.")
- print(f"Sellers will receive {math.floor(donate)} leva.")
- else:
- print(f"{(need_money):.2f} money needed.")
Advertisement
Add Comment
Please, Sign In to add comment