New House
Здравейте! На 5-та задача - New House не мога да получа повече от 70%.
Може ли някакви съвети, какъв може да е проблема.
flower_type = input() number_flowers = int(input()) budget = int(input()) final = 0 if flower_type == 'Roses': if number_flowers >= 80: area = number_flowers * 5 * 0.1 total = number_flowers * 5 - area if budget >= total: final = budget - total print(f'Hey, you have a great garden with {number_flowers} {flower_type} and {final:.2f} leva left.') else: final = total - budget print(f'Not enough money, you need {final:.2f} leva more.') else: total = number_flowers * 5 if budget >= total: final = budget - total print(f'Hey, you have a great garden with {number_flowers} {flower_type} and {final:.2f} leva left.') else: final = total - budget print(f'Not enough money, you need {final:.2f} leva more.') elif flower_type == 'Dahlias': if number_flowers >= 90: area = number_flowers * 3.80 * 0.15 total = number_flowers * 3.80 - area if budget >= total: final = budget - total print(f'Hey, you have a great garden with {number_flowers} {flower_type} and {final:.2f} leva left.') else: final = total - budget print(f'Not enough money, you need {final:.2f} leva more.') else: total = number_flowers * 3.80 if budget >= total: final = budget - total print(f'Hey, you have a great garden with {number_flowers} {flower_type} and {final:.2f} leva left.') else: final = total - budget print(f'Not enough money, you need {final:.2f} leva more.') elif flower_type == 'Tulips': if number_flowers >= 80: area = number_flowers * 2.80 * 0.15 total = number_flowers * 2.80 - area if budget >= total: final = budget - total print(f'Hey, you have a great garden with {number_flowers} {flower_type} and {final:.2f} leva left.') else: final = total - budget print(f'Not enough money, you need {final:.2f} leva more.') else: total = number_flowers * 2.80 if budget >= total: final = budget - total print(f'Hey, you have a great garden with {number_flowers} {flower_type} and {final:.2f} leva left.') else: final = total - budget print(f'Not enough money, you need {final:.2f} leva more.') elif flower_type == 'Narcissus': if number_flowers < 120: area = 3 * 0.15 total = number_flowers * (3 + area) if budget >= total: final = budget - total print(f'Hey, you have a great garden with {number_flowers} {flower_type} and {final:.2f} leva left.') else: final = total - budget print(f'Not enough money, you need {final:.2f} leva more.') else: total = number_flowers * 3 if budget >= total: final = budget - total print(f'Hey, you have a great garden with {number_flowers} {flower_type} and {final:.2f} leva left.') else: final = total - budget print(f'Not enough money, you need {final:.2f} leva more.') elif flower_type == 'Gladiolus': if number_flowers < 80: area = 2.50 * 0.2 total = number_flowers * (2.50 + area) if budget >= total: final = budget - total print(f'Hey, you have a great garden with {number_flowers} {flower_type} and {final:.2f} leva left.') else: final = total - budget print(f'Not enough money, you need {final:.2f} leva more.') else: total = number_flowers * 2.50 if budget >= total: final = budget - total print(f'Hey, you have a great garden with {number_flowers} {flower_type} and {final:.2f} leva left.') else: final = total - budget print(f'Not enough money, you need {final:.2f} leva more.')
Много спретнато стана така, благодаря!