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
In most presentation software, custom animations are added from the _____.
gtnhenbr [62]

Answer:

Explanation:

the answer is.....normal view

8 0
3 years ago
What type of malware actually evolves, changing its size and other external file characteristics to elude detection by antivirus
Free_Kalibri [48]

Answer:

This type of malware are called Polymorphic Malware.

6 0
3 years ago
Which of the following examples illustrates the Crowding Out Effect?
maks197457 [2]

your answer is c to what your looking for



6 0
3 years ago
c++ Write a for loop that computes the following sum: 5+10+15+20+...+485+490+495+500. The sum should be placed in a variable sum
ElenaW [278]

Answer:

#include <iostream>

#include <cstdlib>

 

using namespace std;

 

int main(){

 

 

   int sum=0, num=5;   //variables declaration and inicialization

 

   while (sum<500){   //conditioning to do the sum up to 500

   sum=sum+num;     //actually sum process

   cout << "The value is: "<<sum;   //show the result in screen

   };

   return 0;

}

5 0
4 years ago
Glenda is searching airline schedules on HolApp, a mobile Web application. While browsing the application, a banner appears on t
Artemon [7]

Answer:

online display advertisement

Explanation:

Q:

Glenda is searching airline schedules on HolApp, a mobile Web application. While browsing …

A. online display advertisement

B. contextual advertisement...

A:

A

6 0
2 years ago
Other questions:
  • Two electronics technicians are looking at the piece of testing equipment shown in the figure above. Technician A says that this
    10·1 answer
  • Cattell classified projective tests, such as the rorschach inkblot test, as:
    13·1 answer
  • Edmund wants to create a website for his university. He has created all the necessary content and now wants to style and format
    11·1 answer
  • WHICH COMPUTER COMPONENT CONTAINS ALL THE CIRCUITRY NECESSARY FOR THE OTHER COMPONENTS OR DEVICES TO COMMUNICATE WITH ONE ANOTHE
    12·1 answer
  • Will Give Brainliest
    10·1 answer
  • What is the purpose of the Hide Slide feature in a presentation program?
    14·1 answer
  • The part of the screen where you see the results of your code is called the Editor.
    15·2 answers
  • Select the best answer from the drop-down menu. Sometimes people feel threatened by new ideas and different ways of doing things
    5·1 answer
  • You arrive at school on Friday for a field trip ! What a lucky day!You need to figure out what room you are in before leaving. Y
    12·1 answer
  • What's good computing?
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!