Ddimov90

flowers_03_03

Oct 2nd, 2025
56
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.75 KB | Source Code | 0 0
  1. chrysanthemum = int(input())
  2. roses = int(input())
  3. tulips = int(input())
  4. season = input()
  5. holiday = input()
  6.  
  7.  
  8. total_flowers = chrysanthemum + roses + tulips
  9. total_price = 0
  10.  
  11. if season == "Spring" or season == "Summer":
  12.     total_price += 2 * chrysanthemum
  13.     total_price += 4.1 * roses
  14.     total_price += 2.5 * tulips
  15.     if tulips > 7 and season == "Spring":
  16.         total_price *= 0.95
  17.  
  18. elif season == "Autumn" or season == "Winter":
  19.     total_price += 3.75 * chrysanthemum
  20.     total_price += 4.5 * roses
  21.     total_price += 4.15 * tulips
  22.     if roses >= 10 and season == "Winter":
  23.         total_price *= 0.9
  24.  
  25. if holiday == "Y":
  26.     total_price *= 1.15
  27. if total_flowers > 20:
  28.     total_price *= 0.8
  29.  
  30. print(f"{2 + total_price:.2f}")
  31.  
  32.  
  33.  
Advertisement
Add Comment
Please, Sign In to add comment