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