1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
alexira [117]
3 years ago
9

In python

Computers and Technology
1 answer:
AnnZ [28]3 years ago
7 0

Answer:

The program in Python is as follows:

mnths = ["january","february","march","april","may","june","july","august","september","october","november","december"]

days = int(input("Day: "))

month = input("Month: ")

if not(month.lower() in mnths):

   print("Invalid")

else:

   month_index = mnths.index(month.lower())

   if month_index == 0:

       if days<1 or days>31:            print("Invalid")

       else:            print("Winter")

   elif month_index == 1:

       if days<1 or days>28:            print("Invalid")

       else:            print("Winter")

   elif month_index == 2:

       if days<1 or days>31:            print("Invalid")

       elif days<= 19:            print("Winter")

       else:            print("Spring")

   elif month_index == 3:

       if days<1 or days>30:            print("Invalid")

       else:            print("Spring")

   elif month_index == 4:

       if days<1 or days>31:            print("Invalid")

       else:            print("Spring")

   elif month_index == 5:

       if days<1 or days>30:            print("Invalid")

       elif days<= 20:            print("Spring")

       else:            print("Summer")

   elif month_index == 6:

       if days<1 or days>31:            print("Invalid")

       else:            print("Summer")

   elif month_index == 7:

       if days<1 or days>31:            print("Invalid")

       else:            print("Summer")

   elif month_index == 8:

       if days<1 or days>31:            print("Invalid")

       elif days<= 21:            print("Summer")

       else:            print("Autumn")

   elif month_index == 9:

       if days<1 or days>31:            print("Invalid")

       else:            print("Autumn")

   elif month_index == 10:

       if days<1 or days>30:            print("Invalid")

       else:            print("Autumn")

   elif month_index == 11:

       if days<1 or days>31:            print("Invalid")

       elif days<21:            print("Autumn")

       else:            print("Winter")

Explanation:

<em>See attachment for complete source file, where comments are used to explain difficult lines</em>

Download txt
You might be interested in
Who do politicians listen to?
horrorfan [7]

Answer:

they dont realy listen to anybody

Explanation:

6 0
3 years ago
Who has gotten a random file link from someone? What file does it contain?
Bad White [126]

Answer:

those are bots , just report those

Explanation:

8 0
3 years ago
Read 2 more answers
A list is a collection that ______________
BigorU [14]

Answer:

free points?

Explanation:

jk d

5 0
3 years ago
The banner on the front page of a newsletter that identifies the publication is the:.
podryga [215]

Answer:

Nameplate

Explanation:

The banner on the front of a newsletter that identifies the publication is its nameplate.

7 0
2 years ago
What does coding mean​
NeTakaya
The process or activity of writing computer programs.
3 0
3 years ago
Read 2 more answers
Other questions:
  • Need help with this C++ question
    5·1 answer
  • What is requirement analysis
    8·1 answer
  • How can i appear offline without fb messenger saying "last active 1 minute ago"?
    5·1 answer
  • Double clicking a word selects the entire word?
    10·1 answer
  • Write a program that finds the largest in a series of numbers entered by the user.The program must prompt the user to enter numb
    12·1 answer
  • Every chart has a corresponding ____ that contains the numerical data displayed by the chart.
    6·1 answer
  • Computer-aided manufacturing (CAM) offers which possible benefits?
    15·2 answers
  • Explain why this product was created?
    7·1 answer
  • Please answer questions in complete sentences!
    14·1 answer
  • HELP ASAP WILL GIVE BRAINLY Question 19 Multiple Choice Worth 5 points) (05 03 MC) Network technologies specialist Hannah has be
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!