Advertisement
pacho_the_python

Untitled

Sep 19th, 2021
78
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. puzzles = int(input())
  3. dolls = int(input())
  4. bears = int(input())
  5. minions = int(input())
  6. trucks = int(input())
  7.  
  8. puzzle_price = puzzles * 2.60
  9. doll_price = dolls * 3
  10. bear_price = bears * 4.10
  11. minion_price = minions * 8.20
  12. truck_price = trucks * 2
  13.  
  14. total_sum = puzzle_price + doll_price + bear_price + minion_price + truck_price
  15.  
  16. toy_count = puzzles + dolls + bears + minions + trucks
  17. bonus = 0
  18.  
  19. if toy_count >= 50:
  20.     bonus = total_sum * 0.25
  21.    
  22. bill = total_sum - bonus
  23. rent = bill * 0.1
  24. profit = bill - rent
  25.  
  26. if profit >= trip_price:
  27.     trip_money = (profit - trip_price)
  28.     print(f"Yes! abs{trip_money:.2f} lv left.")
  29. if profit < trip_price:
  30.     trip_money = abs(profit - trip_price)
  31.     print(f"Not enough money! {trip_money:.2f} lv needed.")
  32.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement