Untitled

mail@pastecode.io avatar
unknown
python
2 years ago
1.1 kB
3
Indexable
Never
type_flower = input()
number_flowers = int(input())
budget = int(input())
total_price = 0
if type_flower == 'Roses':
    total_price = number_flowers * 5
    if number_flowers > 80:
        total_price = total_price - (total_price * 0.1)
elif type_flower == 'Dahlias':
    total_price = number_flowers * 3.80
    if number_flowers > 90:
        total_price = total_price - (total_price * 0.15)
elif type_flower == 'Tulips':
    total_price = number_flowers * 2.80
    if number_flowers > 80:
        total_price = total_price - (total_price * 0.15)
elif type_flower == 'Narcissus':
    total_price = number_flowers * 3
    if number_flowers < 120:
        total_price = total_price + (total_price * 0.15)
elif type_flower == 'Gladiolus':
    total_price = number_flowers * 2.50
    if number_flowers < 80:
        total_price = total_price + (total_price * 0.2)

if total_price > budget:
    print(f"Not enough money, you need{total_price - budget: .2f} leva more.")
else:
    print(f"Hey, you have a great garden with {number_flowers} {type_flower} and{budget - total_price: .2f} leva left.")