subject

I am working on 4.17 LAB Seasons for python Write a program that takes a date as input and outputs the date's season. The input is a string to represent the month and an int to represent the day.

April
11
the output is:

Spring
In addition, check if the string and int are valid (an actual month and day).

Ex: If the input is:

Blue
65
the output is:

Invalid
My code is not shaping up too well. When I do this its either Invalid or Summer:
input_month = input()
input_day = int(input())

if input_month == 'March':
if not(1<=input_day<=31):
print ("Invalid")
elif input_day<=19:
print("Winter")
else:
print ("Spring")
if input_month == 'April' :
if not(1<=input_day<=30):
print("Invalid")
elif input_day <=30:
else:
print("Spring")
if input_month == "May":
I just need to be pointed in the right direction. Thanks for your help!

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 17:00
Your computer running windows 10 is doing some very strange things with the operating system. you are fairly certain it is not a hardware issue. you need to try to get further insight into what is going on within the operating system. which tool would be best suited for this?
Answers: 2
question
Computers and Technology, 22.06.2019 19:10
How might the success of your campaign be affected if you haven’t carefully completed all field data or if you accidentally insert the wrong merge field in the document?
Answers: 1
question
Computers and Technology, 22.06.2019 19:30
When using a public computer or network, you should always
Answers: 2
question
Computers and Technology, 23.06.2019 03:30
Hashtags serve to identify the topic of a given tweet true false
Answers: 2
You know the right answer?
I am working on 4.17 LAB Seasons for python Write a program that takes a date as input and outputs...
Questions
question
Biology, 27.04.2020 01:21
question
Mathematics, 27.04.2020 01:21
question
Biology, 27.04.2020 01:21
Questions on the website: 13722360