Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- flowers = input()
- count = int(input())
- budget = int(input())
- price = 0
- type = ["Roses", "Dahilias", "Tulips", "Narcissus", "Gladiolus"]
- prices = [5, 3.80, 2.80, 3, 2.50]
- if flowers in type:
- index = type.index(flowers)
- price = count * prices[index]
- if flowers == type[0] and count > 80:
- price *= 0.9
- elif (flowers == type[1] and count > 90) or (flowers == type[2] and count > 80):
- price *= 0.85
- elif flowers == type[3] and count < 120:
- price *= 1.15
- elif flowers == type[4] and count < 80:
- price *=1.2
- if budget >= price:
- print(f"Hey, you have a great garden with {count} {flowers} and {(budget - price):.2f} leva left.")
- else:
- print(f"Not enough money, you need {(price - budget):.2f} leva more.")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement