Untitled
unknown
plain_text
a year ago
1.2 kB
12
Indexable
type_of_flower = input()
quantity = int(input())
budget = int(input())
discount = 0
flowers_price = 0
price_increase = 0
if type_of_flower == 'Roses':
flowers_price = 5
if quantity >= 80:
discount = (quantity * flowers_price) * 0.10
elif type_of_flower == 'Dahlias':
flowers_price = 3.80
if quantity >= 90:
discount = (quantity * flowers_price) * 0.15
elif type_of_flower == 'Tulips':
flowers_price = 2.80
if quantity >= 80:
discount = (quantity * flowers_price) * 0.15
elif type_of_flower == 'Narcissus':
flowers_price = 3
if quantity <= 120:
price_increase = (quantity * flowers_price) * 0.15
elif type_of_flower == 'Gladiolus':
flowers_price = 2.50
if quantity <= 80:
price_increase = (quantity * flowers_price) * 0.20
total_price = (quantity * flowers_price) - discount + price_increase
if total_price <= budget:
print(f"Hey, you have a great garden with {quantity} {type_of_flower} and {(budget - total_price):.2f} leva left.")
else:
print(f"Not enough money, you need {(total_price - budget):.2f} leva more.")
Editor is loading...
Leave a Comment