Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- trip_price = float(input())
- puzzle_count = int(input())
- toy_count = int(input())
- bear_count = int(input())
- minions_count = int(input())
- truck_count = int(input())
- puzzle = 2.60
- toy = 3
- bear = 4.10
- minion = 8.20
- truck = 2
- toys_count = puzzle_count + toy_count + bear_count + minions_count + truck_count
- result = puzzle * puzzle_count + toy * toy_count + \
- bear * bear_count + minions_count * minion + truck_count * truck
- if toys_count >= 50:
- result -= result * 0.25
- result -= result * 0.10
- if result >= trip_price:
- resolt = abs(trip_price - result)
- print(f"Yes! {resolt:.2f} lv left.")
- else:
- resolt = abs(trip_price - result)
- print(f"Not enough money! {resolt:.2f} lv needed.")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement