Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import math
- money_needed = float(input())
- number_fantasy_book = int(input())
- number_horror_book = int(input())
- numbe_romatic_book = int(input())
- sum_fantasy = number_fantasy_book * 14.90
- sum_horro = number_horror_book * 9.80
- sum_romantic = numbe_romatic_book * 4.30
- sum_book = sum_fantasy+sum_horro+sum_romantic
- total_sum = sum_book*0.80
- if total_sum > money_needed:
- sum_salary = math.floor((total_sum-money_needed)*0.10)
- print(f"{(total_sum - sum_salary):.2f} leva donated.")
- print(f"Sellers will receive {sum_salary} leva.")
- else:
- print(f"{(money_needed-total_sum):.2f} money needed.")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement