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
Which soft skills would these mobile app developers need to use in the situations described?
Ber [7]

Answer:

1: work ethic/presentation.

2: communication.

3: adaptability.

4: creativity.

(these are all guesses so i'm not 100% sure)

Explanation:

6 0
2 years ago
Read 2 more answers
Which file format would be appropriate for web graphics​
Eddi Din [679]

Answer:

PNG

Explanation:

PNG files can shrink to incredibly small sizes - especially images that are simple colours, shapes, or text. This makes it the ideal image file type for Web graphics.

4 0
2 years ago
What are the vertical areas of the spreadsheet?
stepladder [879]

Answer:

Columns

Explanation:

A spreadsheet may a explained as a tabular arrangement or arrays of cells which allows users to enter both numeric and string data for storage, manipulation and analysis. The spreadsheet program has both the vertical and horizontal cell arrangement with the vertical areas being reffered to as THE COLUMN which are labeled using alphabets arranged from A - AZ, AA - AZ, and so on to make up a total of 16384 columns on the Microsoft Excel spreadsheet program. Cells are located using a combination of column and row address. With row representing the horizontal area of the spreadsheet and labeled with digits. Therefore cells are usually refereed to as A1, (column A row 1) and so on.

7 0
2 years ago
When mysql automatically converts one data type to another, itâs known as a/an ______________________ conversion?
lubasha [3.4K]
<span>MySQL is an open-source relational database management system (RDBMS)</span>
When MySQL automatically converts one data type to another, is known as an implicit conversion. Implicit conversion refers to the mixing and matching data types within the same operation. Example for implicit conversion is when MySQL automatically converts numbers to strings and vice versa. 
5 0
3 years ago
What is paragraphing in keyboarding? ​
sesenic [268]

Answer:

the pilcrow symbol is paragraphing in keyboard

5 0
3 years ago
Read 2 more answers
Other questions:
  • Which activity cannot be done on a social networking site?
    12·1 answer
  • Suppose your friend, who is a small business owner, wants to computerize her business functions such as accounting, payroll, and
    7·1 answer
  • What is the term for the conversion of a bitmap image to a vector image?
    8·1 answer
  • Help, please!! A file named "games.txt" exists and has 80 lines of data. You open the file with the following line of code. aFil
    6·1 answer
  • You created the following dictionary relationships = {'Jimmy':'brother', 'Carol':'sister'}. You then executed the following code
    5·1 answer
  • Write a program that prints the numbers 1 to 4 on the sameline with each pair of adjacent numbers separated by a single space(1
    5·1 answer
  • Paul is playing a game when his computer shuts down unexpectedly. Paul has noticed recently that his fans are running very loud.
    13·1 answer
  • The moon has less mass than the earth, so what happens to objects on the moon?
    11·1 answer
  • Which of the following information should be included in audit documentation? a. Procedures performed. b. Audit evidence examine
    13·1 answer
  • The breastbone or ________________ extends down the chest.
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!