Advertisement
mbstanchev

Untitled

Jan 17th, 2022
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.81 KB | None | 0 0
  1. puzzle = 2.60
  2. said_doll = 3
  3. plush_bear = 4.10
  4. minion = 8.20
  5. truck = 2
  6.  
  7. money_to_trip = float(input())
  8. count_puzzle = int(input())
  9. count_said_doll = int(input())
  10. count_plush_bear = int(input())
  11. count_minions = int(input())
  12. count_truck = int(input())
  13.  
  14. order_toys = count_puzzle + count_said_doll + count_plush_bear + count_minions + count_truck
  15.  
  16. earned_money = count_puzzle * puzzle + count_said_doll * said_doll + count_plush_bear * plush_bear + \
  17. count_minions * minion + count_truck * truck
  18.  
  19. if order_toys >= 50:
  20. earned_money *= 0.75
  21.  
  22. earned_money = earned_money * 0.9
  23. money_defference = abs(earned_money - money_to_trip)
  24.  
  25.  
  26. if earned_money >= money_to_trip:
  27. print(f"Yes! {money_defference:.2f} lv left.")
  28. else:
  29. print(f"Not enough money! {money_defference:.2f} lv needed.")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement