Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- price_for_vacancion = float(input())
- number_puzzles = int(input())
- number_talking_dalls = int(input())
- number_teddy_bears = int(input())
- number_minions = int(input())
- number_trucks = int(input())
- puzzles = 2.60
- talk_dalls = 3
- teddy_bear = 4.1
- minions = 8.20
- truck = 2
- number_of_all_toys = number_puzzles + number_talking_dalls + number_minions + number_teddy_bears + number_trucks
- total_sum = (number_puzzles * puzzles) + (number_talking_dalls * talk_dalls) + (number_teddy_bears * teddy_bear) \
- + (number_minions * minions) + (number_trucks * truck)
- if number_of_all_toys >= 50:
- discount = total_sum * 0.25
- total_price = total_sum - discount
- else:
- total_price = total_sum
- rent_for_house = total_price * 0.10
- profit = total_price - rent_for_house
- remainig_money = abs(profit - price_for_vacancion)
- if price_for_vacancion > profit:
- print(f"Not enough money! {remainig_money:.2f} lv needed.")
- else:
- print(f"Yes! {remainig_money:.2f} lv left.")
Advertisement
Add Comment
Please, Sign In to add comment