Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- puzzle_price = 2.60
- talking_barbie = 3
- teddy_bear = 4.10
- minion = 8.20
- truck_toy = 2
- trip_price = float(input())
- a = num_of_puzzles = int(input())
- b = num_of_talking_barbie = int(input())
- c = num_of_teddy_bears = int(input())
- d = num_of_minions = int(input())
- e = num_of_toy_trucks = int(input())
- price = a * puzzle_price + b * talking_barbie + c * teddy_bear + d * minion + e * truck_toy
- num_toys = num_of_puzzles + num_of_talking_barbie + num_of_teddy_bears + num_of_minions + num_of_toy_trucks
- if num_toys >= 50:
- discount = price * 25 / 100
- total = price - discount
- rent = total * 10 / 100
- profit = total - rent
- else:
- discount = 0
- rent = price * 10 / 100
- profit = price - rent
- if profit >= trip_price:
- left_money = profit - trip_price
- print(f"Yes! {left_money:.2f} lv left.")
- else:
- needed_money = trip_price - profit
- print(f"Not enough money! {needed_money:.2f} lv needed.")
Advertisement
Add Comment
Please, Sign In to add comment