Advertisement
CR7CR7

months

Sep 3rd, 2023
850
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.68 KB | None | 0 0
  1. month = input()
  2. date = int(input())
  3.  
  4. if month in ['January', 'February']:
  5.     print('Winter')
  6. elif month == 'March':
  7.     if date <= 19:
  8.         print('Winter')
  9.     else:
  10.         print('Spring')
  11. elif month in ['April', 'May']:
  12.     print('Spring')
  13. elif month == 'June':
  14.     if date <= 20:
  15.         print('Spring')
  16.     else:
  17.         print('Summer')
  18. elif month in ['July', 'August']:
  19.     print('Summer')
  20. elif month == 'September':
  21.     if date <= 21:
  22.         print('Summer')
  23.     else:
  24.         print('Autumn')
  25. elif month in ['October', 'November']:
  26.     print('Autumn')
  27. elif month == 'December':
  28.     if date <= 20:
  29.         print('Autumn')
  30.     else:
  31.         print('Winter')
  32.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement