Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- price_puzzle = 2.60
- price_talking_doll = 3.00
- price_bear = 4.10
- price_minion = 8.20
- price_truck = 2.00
- rest = float(input())
- puzzles = int(input())
- talking_dolls = int(input())
- bears = int(input())
- minions = int(input())
- trucks = int(input())
- sum_toys = price_puzzle * puzzles + price_talking_doll * talking_dolls + price_bear * bears + price_minion * minions + price_truck * trucks
- pieces_toys = puzzles + talking_dolls + bears + minions + trucks
- if pieces_toys > 50:
- discount = sum_toys * 0.25
- final_price = sum_toys - discount
- else:
- final_price = sum_toys
- profit = final_price - (final_price * 0.10)
- if profit > rest:
- sum_profit = profit - rest
- print(f"Yes! {sum_profit:.2f} lv left.")
- else:
- money_left = rest - profit
- print(f"Not enough money! {money_left:.2f} lv needed.")
Add Comment
Please, Sign In to add comment