blob: 031a5db875984841ed7cc694217424f978f2c373 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
def month_season(month,days):
if month in ('January', 'February', 'March'):
season = 'winter'
elif month in ('April', 'May', 'June'):
season = 'spring'
elif month in ('July', 'August', 'September'):
season = 'summer'
else:
season = 'autumn'
if (month == 'March') and (days > 19):
season = 'spring'
elif (month == 'June') and (days > 20):
season = 'summer'
elif (month == 'September') and (days > 21):
season = 'autumn'
elif (month == 'October') and (days > 21):
season = 'autumn'
elif (month == 'November') and (days > 21):
season = 'autumn'
elif (month == 'December') and (days > 20):
season = 'winter'
return season
|