The year is divided into four seasons: spring, summer, fall and winter. While the exact dates that the seasons change vary a little bit from year to year because of the way that the calendar is constructed, we will use the following dates for this exercise:
Season First day
Summer March 20
Spring June 21
Fall September 22
Winter December 21
Create a program that reads a month and day from the user. The user will enter the name of the month as a string, followed by the day within the month as an integer.
Then your program should display the season associated with the date that was entered.
Note: Enter First three letter for month example: Jan for january, Feb for Feburary ans so on....and first letter of the month should be capital
m=input()
m=input()
d=int(input())
if ((m=='Mar') and (d==20)):
print("Summer")
if ((m=='Jun')and (d==21)):
print("Spring")
if ((m=='Sep') and (d==22)):
print("Fall")
if ((m=='Dec') and (d==21)):
print("Winter")
Comments
Post a Comment