month = int(input("Enter the month: "))
day = int(input("Enter the day: "))
if month in (1, 2, 3):
season = 'winter'
elif month in (4, 5, 6):
season = 'spring'
elif month in (7, 8, 9):
season = 'summer'
else:
season = 'autumn'
if (month == 3) and (day > 19):
season = 'spring'
elif (month == 6) and (day > 20):
season = 'summer'
elif (month == 9) and (day > 21):
season = 'autumn'
elif (month == 12) and (day > 20):
season = 'winter'
print("Season is",season)
Comments
Leave a comment