Advertisement
mbstanchev

Untitled

Jan 26th, 2022
31
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.43 KB | None | 0 0
  1. import math
  2.  
  3. num_magn=int(input())
  4. num_zomb=int(input())
  5. num_roses=int(input())
  6. num_kaktus=int(input())
  7. price_of_gift=float(input())
  8. tax = 0.95
  9. price = (num_magn * 3.25 + num_zomb * 4 + num_roses * 3.5 + num_kaktus * 8)
  10. all = math.floor(price * tax)
  11. difference = abs(all - price_of_gift)
  12.  
  13. if all >= price_of_gift:
  14. print(f"She is left with {difference} leva.")
  15. else:
  16. print(f"She will have to borrow {difference} leva.")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement