Advertisement
Nenogzar

Untitled

Sep 5th, 2023
1,014
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.75 KB | None | 0 0
  1. puzzle = 2.60
  2. talking_doll= 3
  3. teddy_bear = 4.10
  4. mignon = 8.20
  5. truck = 2
  6.  
  7. excursion_price = float(input())
  8. puzzle_num = int(input())
  9. talking_doll_num  = int(input())
  10. teddy_bear_num = int(input())
  11. mignon_num = int(input())
  12. truck_num = int(input())
  13.  
  14. count_toys = puzzle_num+ talking_doll_num+teddy_bear_num+mignon_num+truck_num
  15. price = puzzle*puzzle_num + talking_doll*talking_doll_num + teddy_bear*teddy_bear_num + mignon*mignon_num + truck*truck_num
  16.  
  17.  
  18. discount = 0
  19. if count_toys >= 50:
  20.     discount =price * 0.25
  21.  
  22. rent = (price - discount) * 0.1
  23. profit = price - discount - rent
  24.  
  25. if excursion_price < profit:
  26.     print(f"Yes! {profit-excursion_price:.2f} lv left.")
  27. else:
  28.     print(f"Not enough money! {excursion_price - profit:.2f} lv needed.")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement