Advertisement
mbstanchev

Untitled

Jan 24th, 2022
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.74 KB | None | 0 0
  1. price_puzzel = 2.6
  2. price_dole = 3
  3. price_bear = 4.1
  4. price_minion = 8.2
  5. price_truck = 2
  6. price_trip = float(input())
  7. num_puzzel = int(input())
  8. num_dole = int(input())
  9. num_bears = int(input())
  10. num_minion = int(input())
  11. num_truck = int(input())
  12.  
  13. total_numb = num_puzzel + num_dole + num_bears + num_minion + num_truck
  14.  
  15. turn_over = price_puzzel * num_puzzel + price_dole * num_dole + price_bear * num_bears\
  16. + price_minion * num_minion + price_truck * num_truck
  17.  
  18. if total_numb >= 50:
  19. turn_over *= 0.75
  20.  
  21. earned_money = turn_over * 0.9 # - наем 0.1%
  22. money = abs(price_trip - earned_money)
  23.  
  24. if earned_money >= price_trip:
  25. print(f"Yes! {money:.2f} lv left.")
  26. else:
  27. print(f"Not enough money! {money:.2f} lv needed.")
  28.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement