Advertisement
veronikaaa86

04. Toy Shop

Jul 10th, 2022
381
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.63 KB | None | 0 0
  1. trip_price = float(input())
  2. puzzle_count = int(input())
  3. dolls_count = int(input())
  4. teddy_count = int(input())
  5. minions_count = int(input())
  6. trucks_count = int(input())
  7.  
  8. total_sum = (puzzle_count * 2.6) + (dolls_count * 3) + (teddy_count * 4.10) + (minions_count * 8.20) + (trucks_count * 2)
  9.  
  10. total_count = puzzle_count + dolls_count + teddy_count + minions_count + trucks_count
  11. if total_count >= 50:
  12. total_sum = total_sum * 0.75
  13.  
  14. total_sum = total_sum * 0.90
  15.  
  16. diff = abs(total_sum - trip_price)
  17. if total_sum >= trip_price:
  18. print(f"Yes! {diff:.2f} lv left.")
  19. else:
  20. print(f"Not enough money! {diff:.2f} lv needed.")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement