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
Vanyuwa [196]
3 years ago
11

Write a program named CheckMonth that prompts a user to enter a birth month. If the value entered is greater than 12 or less tha

n 1, display the error message Invalid month; otherwise, display the valid month with a message such as 3 is a valid month.
Computers and Technology
1 answer:
klemol [59]3 years ago
3 0

Answer:

Program:

month=['January', 'Februrary', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'] #list which stores the name of the month.

CheckMonth= int(input("Enter the number of the month")) #it is used to take the inputs from the user.

if CheckMonth>=1 and CheckMonth<=12: #check the condition for valid month.

   print(str(CheckMonth)+" is a valid month which name is: "+ str (month [CheckMonth-1])) #print the name of month which is enter by the user.

else:

   print(str(CheckMonth)+" is not a valid month, please enter the valid month") # print for the invalid month.

Output:

  • If the user inputs 1, it will prints "1 is a valid month which name is: January".
  • If the user inputs is 0, then it will prints "0 is not a valid month, please enter the valid month"

Explanation:

  • The above program is in python language, in which the first line of the code is used to hold the list of the month.
  • Then the second line is used to render a message for the user input, take the input from the user and save it into a variable.
  • Then that value is checked by the if-condition that it lies in between 1 to 12 or not.
  • If it lies, then print the valid month otherwise it prints that the month is invalid.
You might be interested in
An organization has a website with a guest book feature, where visitors to the web site can input their names and comments about
kozerog [31]

Answer:

B

Explanation:

6 0
3 years ago
Read 2 more answers
A goal should be___.
Luda [366]

Answer:

D

Explanation:

5 0
3 years ago
Read 2 more answers
Consider five wireless stations, A, B, C, D, and E.
klio [65]

Answer:

Check the explanation

Explanation:

A) Whenever C is sending to D, what other communications are possible?

C’s packet will be seen by A, B and D, but not by E. Thus, D can send to E at the sametime..

B) Whenever B is sending to A, what other communications are likely?

Even though B’s packet will not be seen by D, other nodes, e.g., E, or C, can’t send to D since the packets from these nodes will interfere with the packets from B at A. Therefore, other communications is not likely at the same time.

C) Whenever B is sending to C, what other communications are possible?

B’s packet will be seen by E, A and C, by not by D. therefore, E can send to D at the same point.

4 0
3 years ago
How can we work together to fix problems with our websites
Virty [35]
Add a Value Proposition. ...
Website Navigation. ...
Call to Action Text. ...
Call to Action Colors. ...
Try The 10-Foot Test. ...
Carousels. ...
Social Proof. ...
Testimonial Pages.
8 0
3 years ago
You work in an office that uses Linux and Windows servers. The network uses the IP protocol. You are sitting at a Windows workst
Westkost [7]

Answer:

The ping command.

Explanation:

In a network, workstations known as clients, users or nodes are the devices where data is needed or sents from. A server on the other hand, is a device in the network, configured to render a particular service like database, domain name service, web service etc.

When a link from a workstation to a server is down, the workstation looses connection the server. To confirm the connectivity of the link, "ping" the server ip address from the workstation using the command "ping 'server ip address'". This sends echo packets to the server, which is echoed back if there is connectivity.

6 0
3 years ago
Other questions:
  • How would you maximize the use of outsourced programmers?
    5·1 answer
  • When you enter a two-digit year that is less than 30, Excel changes the year to _____. Question 7 options:
    7·1 answer
  • What is the role of programmers in an organization?
    6·1 answer
  • And what way do you mixed and market economy support the ideals of democracy​
    12·1 answer
  • What is one way you can learn about your digital footprint?
    13·1 answer
  • Which statement is NOT a rule for the data source for the mail merge?
    13·2 answers
  • Ways to be your best digital self?
    7·1 answer
  • What impact download speeds on different computers
    13·1 answer
  • A system forensics specialist has three basic tasks related to handling evidence: find evidence, preserve evidence, and ________
    6·1 answer
  • Write the icon of full justification​
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!