Sichanov

flowers

Jul 1st, 2021
163
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.99 KB | None | 0 0
  1. hrisantemas = int(input())
  2. roses = int(input())
  3. tulips = int(input())
  4. season = input()
  5. holiday = input()
  6. hrisantemas_price = 0
  7. roses_price = 0
  8. tulips_price = 0
  9.  
  10. if season == 'Spring' or season == 'Summer':
  11.     hrisantemas_price = hrisantemas * 2.00
  12.     roses_price = roses * 4.10
  13.     tulips_price = tulips * 2.50
  14.  
  15. elif season == 'Autumn' or season == 'Winter':
  16.     hrisantemas_price = hrisantemas * 3.75
  17.     roses_price = roses * 4.50
  18.     tulips_price = tulips * 4.15
  19. if holiday == 'Y':
  20.     hrisantemas_price += hrisantemas_price * 0.15
  21.     tulips_price += tulips_price * 0.15
  22.     roses_price += roses_price * 0.15
  23. total_price = hrisantemas_price + roses_price + tulips_price
  24. if tulips > 7 and season == 'Spring':
  25.     total_price -= total_price * 0.05
  26. if roses >= 10 and season == 'Winter':
  27.     total_price -= total_price * 0.10
  28.  
  29. if hrisantemas + roses + tulips > 20:
  30.     total_price -= total_price * 0.2
  31. total_with_arranging = total_price + 2
  32. print(f'{total_with_arranging:.2f}')
  33.  
Advertisement
Add Comment
Please, Sign In to add comment