Facebook
From Reliable Pig, 1 Year ago, written in Plain Text.
Embed
Download Paste or View Raw
Hits: 101
  1. puzzle = 2.60
  2. doll = 3.00
  3. bear = 4.10
  4. minion = 8.20
  5. truck = 2.00
  6. price_of_the_excursion = float(input())
  7. puzzle_count = int(input())
  8. doll_count = int(input())
  9. bear_count = int(input())
  10. minion_count = int(input())
  11. truck_count = int(input())
  12. total_sum = (puzzle * puzzle_count) + (doll_count * doll) + (bear * bear_count) + (minion_count * minion) + (truck_count * truck)
  13. total_count = puzzle_count + doll_count + bear_count + minion_count + truck_count
  14. if total_count > 50:
  15.     total_sum = total_sum - (total_sum * 0.25)
  16. total_sum = total_sum - (total_sum * 0.1)
  17. diff = abs(price_of_the_excursion - total_sum)
  18. if price_of_the_excursion <= total_sum:
  19.     print(f"Yes!{diff:2f} lv left")
  20. else:
  21.     print(f"Not enough money!!{diff:2f} lv needed")
  22.