Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # 07. Flower Shop
- import math
- magnolia_q = int(input())
- hyacinths_q = int(input())
- roses_q = int(input())
- cacti_q = int(input())
- gift_price = float(input())
- magnolia = magnolia_q * 3.25
- hyacinths = hyacinths_q * 4
- roses = roses_q * 3.50
- cacti = cacti_q * 8
- all = (magnolia + hyacinths + roses + cacti)
- taxex = all- (all * 0.05)
- if taxex < gift_price:
- end = gift_price - taxex
- print(f"She will have to borrow {math.ceil(end)} leva.")
- elif taxex >= gift_price:
- end = taxex - gift_price
- print(f"She is left with {math.trunc(end)} leva.")
Advertisement
Add Comment
Please, Sign In to add comment