BbJLeB

07. Flower Shop

May 10th, 2019
192
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.57 KB | None | 0 0
  1. # 07. Flower Shop
  2. import math
  3.  
  4. magnolia_q = int(input())
  5. hyacinths_q = int(input())
  6. roses_q = int(input())
  7. cacti_q = int(input())
  8. gift_price = float(input())
  9.  
  10. magnolia = magnolia_q * 3.25
  11. hyacinths = hyacinths_q * 4
  12. roses = roses_q * 3.50
  13. cacti = cacti_q * 8
  14.  
  15. all = (magnolia + hyacinths + roses + cacti)
  16. taxex = all- (all * 0.05)
  17.  
  18. if taxex <= gift_price:
  19.     end = gift_price - taxex
  20.     print(f"She will have to borrow {math.ceil(end)} leva.")
  21. elif taxex > gift_price:
  22.     end = taxex - gift_price
  23.     print(f"She is left with {math.trunc(end)} leva.")
Advertisement
Add Comment
Please, Sign In to add comment