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 19:20
Write a program that reads a file consisting of students’ test scores in the range 0–200. it should then determine the number of students having scores in each of the following ranges: 0–24, 25–49, 50–74, 75–99, 100–124, 125–149, 150–174, and 175–200. output the score ranges and the number of students. (run your program with the following input data: 76, 89, 150, 135, 200, 76, 12, 100, 150, 28, 178, 189, 167, 200, 175, 150, 87, 99, 129, 149, 176, 200, 87, 35, 157, 189.)
Answers: 3
question
Computers and Technology, 23.06.2019 17:00
What are the 12 colors of the spectrum called?
Answers: 1
question
Computers and Technology, 23.06.2019 22:20
Learning sign language is an example of a(n) learning sign language is an example of a(n)
Answers: 2
question
Computers and Technology, 24.06.2019 07:00
Why do we mark tlc plates with pencil and not with pen
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
English, 20.10.2019 16:10