Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import math
- magnolias = int(input())
- hyacinths = int(input())
- roses = int(input())
- cacti = int(input())
- price_gift = float(input())
- price_magnolias = magnolias * 3.25
- price_hyacinths = hyacinths * 4
- price_roses = roses * 3.50
- price_cacti = cacti * 8
- sum = price_cacti + price_roses + price_hyacinths + price_magnolias
- taxes = sum * 0.05
- total_sum_left = sum - taxes
- if total_sum_left >= price_gift:
- money_left = total_sum_left - price_gift
- print(f"She is left with {math.ceil(money_left)} leva")
- elif total_sum_left < price_gift:
- money_needed = price_gift - total_sum_left
- print(f"She will have to borrow {math.ceil(money_needed)} leva.")
Advertisement
Add Comment
Please, Sign In to add comment