Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- flower = input() # Roses, Dahlias Tulips, Narcissus ,Gladiolus
- quantity = int(input())
- budget = int(input())
- flower_price = 0
- roses_price = 5
- dahlias_price = 3.80
- tulips_price = 2.80
- narcissus_price = 3
- gladiolus_price = 2.50
- if flower == "Roses":
- if quantity > 80:
- flower_price = (roses_price - (roses_price * 0.1)) * quantity
- elif quantity <= 80:
- flower_price = roses_price * quantity
- elif flower == "Dahlias":
- if quantity > 90:
- flower_price = (dahlias_price - (dahlias_price * 0.15 )) * quantity
- elif quantity <= 90:
- flower_price = dahlias_price * quantity
- elif flower == "Tulips":
- if quantity > 80:
- flower_price = (tulips_price - (tulips_price * 0.15)) * quantity
- elif quantity <= 80:
- flower_price = tulips_price * quantity
- elif flower == "Narcissus":
- if quantity < 120:
- flower_price = (narcissus_price + (narcissus_price * 0.15 )) * quantity
- elif quantity >= 120:
- flower_price = narcissus_price * quantity
- elif flower == "Gladiolus":
- if quantity < 80:
- flower_price = (gladiolus_price + (gladiolus_price * 0.20 )) * quantity
- elif quantity >= 80:
- flower_price = gladiolus_price * quantity
- if flower_price <= budget:
- end_budget = budget - flower_price
- print(f"Hey, you have a great garden with {quantity} {flower} and {end_budget:.2f} leva left.")
- elif flower_price > budget:
- end_budget = flower_price - budget
- print(f"Not enough money, you need {end_budget:.2f} leva more.")
Add Comment
Please, Sign In to add comment