Advertisement
desislava_topuzakova

Untitled

Apr 26th, 2020
227
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.77 KB | None | 0 0
  1. import math
  2. vacation_price = float(input())
  3. puzzles = int(input())
  4. dolls = int(input())
  5. bears = int(input())
  6. minions = int(input())
  7. trucks = int(input())
  8. count_toys = puzzles + dolls + bears + minions + trucks
  9.  
  10. price_puzzles = puzzles * 2.60
  11. price_dolls = dolls * 3
  12. price_bears = bears * 4.10
  13. price_minions = minions * 8.20
  14. price_trucks = trucks * 2
  15. price_all = price_puzzles + price_dolls + price_bears + price_minions + price_trucks
  16.  
  17. if count_toys >= 50:
  18. discount = price_all * 0.25
  19. price_all = price_all - discount
  20. magazine_rent = price_all * 0.1
  21. final = price_all - magazine_rent
  22. rest_money = final - vacation_price
  23.  
  24. if rest_money >= 0:
  25. print(f'Yes! {rest_money:.2f} lv left.')
  26. else:
  27. print(f'Not enough money! {abs(rest_money):.2f} lv needed.')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement