Martin_D24

Untitled

Apr 30th, 2023
23
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.85 KB | None | 0 0
  1. puzzle = 2.60
  2. talking_doll = 3.00
  3. plush_bear = 4.10
  4. minion = 8.20
  5. truck = 2
  6.  
  7. trip = float(input())
  8. puzzle_quantity = int(input())
  9. talking_doll_quantity = int(input())
  10. plush_bear_quantity = int(input())
  11. minion_quantity = int(input())
  12. truck_quantity = int(input())
  13. total_quantity = puzzle_quantity + talking_doll_quantity \
  14. + plush_bear_quantity + minion_quantity \
  15. + truck_quantity
  16. profit = puzzle*puzzle_quantity + talking_doll*talking_doll_quantity \
  17. + plush_bear*plush_bear_quantity + minion*minion_quantity \
  18. + truck*truck_quantity
  19. if total_quantity >= 50:
  20. profit -= profit*0.25
  21. profit -= profit*0.10
  22. if profit < trip:
  23. diff = trip - profit
  24. print(f"Not enough money! {diff:.2f} lv needed.")
  25. else:
  26. diff = profit - trip
  27. print(f"Yes! {diff:.2f} lv left.")
Add Comment
Please, Sign In to add comment