Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- num_hrizantema = int(input())
- num_roses = int(input())
- num_tulips = int(input())
- season = input() # Spring, Summer, Аutumn, Winter
- day = input() # Y – да / N - не
- price = 0
- if season == "Spring" or season == "Summer":
- price += num_hrizantema * 2
- price += num_roses * 4.10
- price += num_tulips * 2.50
- elif season == "Autumn" or season == "Winter":
- price += num_hrizantema * 3.75
- price += num_roses * 4.50
- price += num_tulips * 4.15
- if num_tulips > 7 and season == "Spring":
- price *= 0.95
- if num_roses >= 10 and season == "Winter":
- price *= 0.9
- if num_roses + num_tulips + num_hrizantema > 20:
- price *= 0.8
- if day == "Y":
- price *= 1.15
- print(f"{price + 2:.2f}")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement