Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- count_chrysanthemums = int(input())
- count_roses = int(input())
- count_tulips = int(input())
- season = input()
- day_off = input()
- price_bouquet = 0
- if season == "Spring" or season == "Summer":
- if day_off == "Y":
- price_bouquet = (count_chrysanthemums * 2 + count_roses * 4.10 + count_tulips * 2.50) * 1.15
- else:
- price_bouquet = count_chrysanthemums * 2 + count_roses * 4.10 + count_tulips * 2.50
- if count_tulips > 7 and season == "Spring":
- price_bouquet = price_bouquet * 0.95
- else:
- price_bouquet = price_bouquet * 1
- elif season == "Autumn" or season == "Winter":
- price_bouquet = count_chrysanthemums * 3.75 + count_roses * 4.50 + count_tulips * 4.15
- if day_off == "Y":
- price_bouquet = price_bouquet * 1.15
- else:
- price_bouquet = count_chrysanthemums * 3.75 + count_roses * 4.50 + count_tulips * 4.15
- if count_roses >= 10 and season == "Winter":
- price_bouquet = price_bouquet * 0.90
- else:
- price_bouquet = count_chrysanthemums * 3.75 + count_roses * 4.50 + count_tulips * 4.15
- count_flowers = count_chrysanthemums + count_roses + count_tulips
- if count_flowers > 20:
- price_bouquet = price_bouquet * 0.80
- else:
- price_bouquet = price_bouquet * 1
- final_price = price_bouquet + 2
- print(f"{final_price:.2f}")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement