Advertisement
simeonshopov

Flower shop

Sep 11th, 2019
151
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.32 KB | None | 0 0
  1. import math
  2.  
  3. magnolii=int(input())
  4. zumbul=int(input())
  5. rozi=int(input())
  6. cactus=int(input())
  7. present=float(input())
  8. sum=(magnolii*3.25+zumbul*4+rozi*3.50+cactus*8)*0.95
  9.  
  10. if sum>=present:
  11.   print(f"She is left with {int(sum-present)} leva.")
  12. else:
  13.   print(f"She will have to borrow {math.ceil(present-sum)} leva.")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement