Advertisement
Rayk

Untitled

Apr 25th, 2020
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.72 KB | None | 0 0
  1. lilias = int(input()) # 2 #46.14
  2. roses = int(input()) # 4
  3. tulips = int(input()) # 8
  4. season = str(input()) # Spring
  5. day = str(input()) # Y
  6.  
  7. lilia_price = 0
  8. rose_price = 0
  9. tulip_price = 0
  10. if season == 'Spring' or season == 'Summer':
  11. lilia_price = 2
  12. rose_price = 4.1
  13. tulip_price = 2.5
  14. else:
  15. lilia_price = 3.75
  16. rose_price = 4.5
  17. tulip_price = 4.15
  18.  
  19. bouquet = lilias * lilia_price + rose_price * roses + tulip_price * tulips
  20.  
  21. if day == 'Y':
  22. bouquet *= 1.15
  23.  
  24. if season == 'Spring' and tulips >= 7:
  25. bouquet *= 0.95
  26. if season == 'Winter' and roses >= 10:
  27. bouquet *= 0.9
  28.  
  29. if lilias + tulips + roses > 20:
  30. bouquet *= 0.8
  31.  
  32. bouquet += 2
  33.  
  34. print(f'{bouquet:.2f}')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement