Sichanov

toy

Sep 23rd, 2021
272
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.79 KB | None | 0 0
  1. trip_price = float(input())
  2. puzzle = int(input())
  3. doll = int(input())
  4. bear = int(input())
  5. minion = int(input())
  6. truck = int(input())
  7.  
  8. puzzle_price = puzzle * 2.60
  9. doll_price = doll * 3
  10. bear_price = bear * 4.10
  11. minion_price = minion * 8.2
  12. truck_price = truck * 2
  13. discount = 0
  14.  
  15. total_count = (puzzle + doll + bear + minion + truck)
  16. total_price = (puzzle_price + doll_price + bear_price + minion_price + truck_price)
  17.  
  18. if total_count >= 50:
  19.     discount = total_price * 0.25
  20. else:
  21.     discount = 0
  22.  
  23. rent = (total_price - discount) * 0.1
  24. total_price = total_price - discount - rent
  25. money_need_left = abs(total_price - trip_price)
  26.  
  27. if total_price >= trip_price:
  28.     print(f'Yes! {money_need_left:.2f} lv left.')
  29. else:
  30.     print(f'Not enough money! {money_need_left:.2f} lv needed.')
Advertisement
Add Comment
Please, Sign In to add comment