ed help fixing this python code so that it can display the outputs described in the image

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question

I need help fixing this python code so that it can display the outputs described in the image below

:

input_month = input()

 
input_day = int(input())


months= ('January', 'February','March', 'April' , 'May' , 'June' , 'July' , 'August' , 'September' , "October" , "November" , "December")

 
if not(input_month in months):

    print("Invalid")


elif input_month == 'March':

    if not(1<=input_day<=31):

        print ("Invalid")

    elif input_day<=19:

        print("Winter")

    else:

        print ("Spring")

elif input_month == 'April' :

    if not(1<=input_day<=30):

        print("Invalid")

    else:

        print("Spring")

elif input_month == 'May':

    if not(1<=input_day<=31):

        print("Invalid")

    else:

        print("Spring")

elif input_month == 'June':

    if not(1<=input_day<=30):

        print("Invalid")

    elif input_day<=20:

        print ("Spring")

    else:

        print("Summer")

elif input_month == 'July' or 'August':

    if not(1<=input_day<=31):

        print("Invalid")

    else: 

        print("Summer")

elif input_month == 'September':

    if not(1<=input_day<=31):

        print("Invalid")

    elif input_day<=21:

        print ("Summer")

    else:

        print ("Autumn")

elif input_month == "October":

    if not(1<=input_day<=31):

        print("Invalid")

    else:

        print("Autumn")

elif input_month == "November":

    if not(1<=input_day<=30):

        print("Invalid")

    else:

        print ("Autumn")

elif input_month == "December":

    if not(1<=input_day<=31):

        print("Invalid")

    elif input_day <=20:

        print ("Autumn")

    else:

        print ("Winter")

elif input_month == 'January':

    if not(1<=input_day<=31):

        print("Invalid")

    else:

        print("Winter")

elif input_month == "February":

    if not(1<=input_day<=29):

        print("Invalid")

    else:

        print ("Winter")

Output differs. See highlights below.
Ingut
Your outgut
Ingut
Expected output Autumn
Your outgut
Compare output A
Output differs. See highlights below
Expected output
Compare output A
Input
Your output
Compare output A
Ingut
November
7
Ingut
Summer
Your outgut
Expected output
September
31
Summer
Invalid
December
-1
Your output Invalid
Invalid
0:Compare output A
Output differs. See highlights below.
February
October
31
Summer
Autumn
Transcribed Image Text:Output differs. See highlights below. Ingut Your outgut Ingut Expected output Autumn Your outgut Compare output A Output differs. See highlights below Expected output Compare output A Input Your output Compare output A Ingut November 7 Ingut Summer Your outgut Expected output September 31 Summer Invalid December -1 Your output Invalid Invalid 0:Compare output A Output differs. See highlights below. February October 31 Summer Autumn
Expert Solution
steps

Step by step

Solved in 3 steps with 5 images

Blurred answer
Knowledge Booster
Research
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education