Лаб: Условни конструкции: Задача 7. Магазин за детски играчки
Много благодаря за съдействието! Не мога да разбера къде ми е грешката. Ето и кода:
excursion = float(input()) number_puzzle = float(input()) number_dall = int(input()) number_bear = int(input()) number_minion = int(input()) number_tracks = int(input()) price_puzzle = 2.60 price_dall = 3 price_bear = 4.10 price_minion = 8.20 price_tracks = 2 number_toys = number_puzzle + number_dall + number_bear + number_minion + number_tracks order = number_puzzle * price_puzzle + number_dall * price_dall + number_bear * price_bear + number_minion * price_minion + number_tracks * price_tracks if number_toys >= 50: profit = order - order * 25/100 rent = profit * 10/100 net_profit = profit - rent if net_profit > excursion: money_left = net_profit - excursion elif net_profit < excursion: money_needed = abs(net_profit - excursion) print(f"Yes! {money_left:.2f} lv left.") else: print(f"Not enough money! {money_needed:.2f} lv needed.")
Благодаря много!
Усмихната седмица!