Advertisement
bl00dt3ars

03. Flowers (2)

Nov 27th, 2020
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.69 KB | None | 0 0
  1. num_hrizantema = int(input())
  2. num_roses = int(input())
  3. num_tulips = int(input())
  4. season = input()  # Spring, Summer, Аutumn, Winter
  5. day = input()  # Y – да / N - не
  6. price = 0
  7.  
  8. if season == "Spring" or season == "Summer":
  9.   price += num_hrizantema * 2
  10.   price += num_roses * 4.10
  11.   price += num_tulips * 2.50
  12. elif season == "Autumn" or season == "Winter":
  13.   price += num_hrizantema * 3.75
  14.   price += num_roses * 4.50
  15.   price += num_tulips * 4.15
  16. if num_tulips > 7 and season == "Spring":
  17.   price *= 0.95
  18. if num_roses >= 10 and season == "Winter":
  19.   price *= 0.9
  20. if num_roses + num_tulips + num_hrizantema > 20:
  21.   price *= 0.8
  22. if day == "Y":
  23.   price *= 1.15
  24. print(f"{price + 2:.2f}")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement