Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # 3. Магазин за цветя
- n_chrysanthemums = int(input())
- n_roses = int(input())
- n_tulips = int(input())
- season = str(input())
- holiday = str(input())
- chrysanthemums_price = 0
- roses_price = 0
- tulips_price = 0
- arranging = 2
- total = n_chrysanthemums + n_roses + n_tulips
- if season == "Spring" or season == "Summer":
- chrysanthemums_price = 2
- roses_price = 4.10
- tulips_price = 2.50
- elif season == "Autumn" or season == "Winter":
- chrysanthemums_price = 3.75
- roses_price = 4.50
- tulips_price = 4.15
- if holiday == "Y":
- chrysanthemums_price *= 1.15
- roses_price *= 1.15
- tulips_price *= 1.15
- bouquet = (n_chrysanthemums * chrysanthemums_price) + (n_roses * roses_price) + (n_tulips * tulips_price)
- if n_tulips > 7 and season == "Spring":
- bouquet *= 0.95
- if n_roses >= 10 and season == "Winter":
- bouquet *= 0.9
- if total > 20:
- bouquet *= 0.80
- print(f"{bouquet + arranging:.2f}")
Advertisement
Add Comment
Please, Sign In to add comment