Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- excursion = float(input())
- qty_puzzle = int(input())
- qty_dolls = int(input())
- qty_teddy_bear = int(input())
- qty_minions = int(input())
- qty_trucks = int(input())
- price_puzzle = 2.60
- price_doll = 3
- price_teddy_bear = 4.10
- price_minion = 8.20
- price_truck = 2
- qty_all_toys = qty_puzzle + qty_dolls + qty_teddy_bear + qty_minions + qty_trucks
- sum_all_toys = qty_puzzle * price_puzzle + qty_dolls * price_doll + qty_teddy_bear * price_teddy_bear + qty_minions * price_minion + qty_trucks * price_truck
- if qty_all_toys >50:
- price_after_discount = sum_all_toys * 0.75
- rent = price_after_discount * 0.10
- if price_after_discount - rent > excursion:
- print(f"Yes! {price_after_discount-rent-excursion:.2f} lv left.")
- else:
- print(f"Not enough money! {excursion - (price_after_discount-rent):.2f} lv needed.")
- else:
- rent = sum_all_toys * 0.10
- if sum_all_toys - rent > excursion:
- print(f"Yes! {sum_all_toys - rent-excursion:.2f} lv left.")
- else:
- print(f"Not enough money! {excursion - (sum_all_toys - rent):.2f} lv needed.")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement