Advertisement
AngelBorislavov

Toy shop

Mar 12th, 2025
187
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.77 KB | None | 0 0
  1. puzzle =  2.60
  2. barbie = 3.00
  3. bear = 4.10
  4. minion = 8.20
  5. truck = 2
  6.  
  7. discount = 0
  8.  
  9. holiday_price = float(input())
  10. puzzle_orders = int(input())
  11. barbie_orders = int(input())
  12. bear_orders = int(input())
  13. minion_orders = int(input())
  14. truck_orders = int(input())
  15.  
  16. money = puzzle * puzzle_orders + barbie * barbie_orders + bear * bear_orders + minion * minion_orders + truck * truck_orders
  17.  
  18. total_orders = puzzle_orders + barbie_orders + bear_orders + minion_orders + truck_orders
  19.  
  20. if total_orders >= 50:
  21.     discount = money * 0.25
  22.     money -= discount
  23.  
  24. naem = money * 0.10
  25. money -= naem
  26.  
  27.  
  28. if holiday_price > money:
  29.     print(f"Not enough money! {holiday_price - money:.2f} lv needed.")
  30.  
  31. if holiday_price < money:
  32.     print(f"Yes! {money - holiday_price:.2f} lv left.")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement