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
What does =SUM(B2:B6) mean
dedylja [7]

In Excel the sum B2 and B6 simply means that B2 and B6 Numbers are adding to get a Sum, it actually like the normal Calculator, but in Excel it helps to do the calculation of your your data simple and easy, there is no hard work.

8 0
3 years ago
Me Completan Pliiiis
Brut [27]
Can you translate please i’ll help better
4 0
3 years ago
Which of the following is a trademark automatically received by an organization when a symbol is being consistently used in the
Mashcka [7]

Complete Question:

Which of the following is a trademark automatically received by an organization when a symbol is being consistently used in the normal course of business?

Group of answer choices

A. Open source trademark.

B. Common law trademark.

C. Registered trademark.

D. Open source trademark.

Answer:

B. Common law trademark.

Explanation:

A common law trademark can be defined as a protection or enforceable mark for a product name, logo, symbol or brand name used to distinguish goods and services prior to its registration with the state or federal government. Common law trademark is a trademark which is automatically received by an organization when a symbol is being consistently used in the normal course of business.

This ultimately implies that, common law trademarks are not governed by any statute and as such are only limited to the geographical location where they are used.

For instance, if a tomato paste is being sold to consumers with the product name "Ginoo" in Florida, the company's trademark applies to Florida only. Thus, another company can use the product name without any trademark infringement in other states of the country such as New York, Washington DC, California etc. except in Florida due to a common law trademark.

4 0
3 years ago
What section in an ethernet frame will you find a Virtual Local Area Network (VLAN) header?
Vadim26 [7]

Answer:

Preamble

Explanation:

In the computer network , the ether-net is the frame of link layer protocol data. This frame is used ether net with physical layer of transport mechanism. The ether net frame is of different type.

  • The ether-net II
  • The Novel raw IEEE 802.3
  • IEEE 802.2 LLC
  • IEEE 802.2 SNAP

Each of the Ethernet frame started from Ether net header. It contains the source and the destination. The MAC address is called its first two address.

8 0
3 years ago
Which of these is an example of an input?
boyakko [2]

Answer:

typing on a key board

this is the best Ans.

8 0
2 years ago
Other questions:
  • You have been asked to delete some data from medisoft but find that there is no delete button. what is another method you can us
    10·1 answer
  • Which of the following is true about main content? Select all that apply.
    10·2 answers
  • What is NOT a good habit when presenting to an audience?
    5·2 answers
  • doubleIt is a function that takes one argument and returns no value . The argument is a pointer to int . The function doubles th
    9·1 answer
  • 4. What are the ethical issues of using password cracker and recovery tools? Are there any limitations, policies, or regulations
    5·1 answer
  • Pls help! for computers edge 2021
    7·1 answer
  • Discuss the core technologies and provide examples of where they exist in society. Discuss how the core technologies are part of
    14·1 answer
  • What are the functions of super computer?<br> ​
    7·2 answers
  • The math function ceil(x) returns the smallest integer that is greater than or equal to x. True False
    12·1 answer
  • Identify the calculation performed by the following code.
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!