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
Insufficient vacuum will require the driver to _______________ to adequately activate the brakes?
sp2606 [1]
A i think idk im trying to earn points
8 0
3 years ago
Look at the slide. How could the slide best be improved? By reducing the number of visual aids by increasing the font size by da
azamat

Answer:

b.  by providing more information

Explanation:

5 0
3 years ago
Read 2 more answers
Arrange the binary number in increasing order of their arithmetic output in the decimal number system ?
tiny-mole [99]
I think the order would be

10010001-1000001 (as the biggest amount)
100101100/101
10011x101
10010x11
10100+10101 (as the least amount)

hope this helps! :)
6 0
3 years ago
John have subscribed to a cloud-based service to synchronize data between your mobile device and your PC. Before allowing the da
xeze [42]

Answer: Mutual authentication

Explanation: Mutual authentication could be referred to a vetting process where the two entities in communication authenticate each other, it could also be referred to as a two-way authentication.

In the scenario above, the cloud service or server authenticates itself with the client and the client authentication itself with the cloud service server by verifying or vetting the certificates of both communicating entities before a secure encrypted connection would be established or created.

8 0
3 years ago
Read 2 more answers
Refer to the method f:
Goshia [24]
<h2>This function will land up in infinite function call</h2>

Explanation:

first time when the function gets invoked,

f(6,8), so k=6 & n=8, inside the function it checks k==n, ie. 6==8, returns false, then one more if is available, so 6>8 is check for , once again it is false and else loop is executed, the function is called recursively using f(k-n,n), that is f(6-8,8), it means f(-2,8) is passed.

Second time,

if(-2==8) is false, so if(-2>8) is again false and function f(-10, 8) is called

if(-10==8) is false, so if(-10>8) is again false and function f(-18,8) is called

if(-18==8) is false, so if(-18>8) is again false and function f(-26,8) is called

So this goes recursively and ends in an infinite function call.

5 0
4 years ago
Other questions:
  • Which command would you use to move a file from one location to another?
    6·2 answers
  • Why is it critical to provide proper treatment for minor and moderate sports injuries within the first 48 hours after sustaining
    14·1 answer
  • Pixels are small dots in columns and rows that allow an image to be seen on a display screen.
    6·1 answer
  • What is renewable energy
    12·1 answer
  • bad word bad word bad word bad wordbad word bad wordbad word bad wordbad word bad wordbad word bad wordbad word bad wordbad word
    5·1 answer
  • Software on your computer is taking a long time to load. What could help solve this problem?
    5·1 answer
  • URGENT: I need to add a while loop in this program but I don't know-how. I am also having trouble neatening some lines of code.
    15·1 answer
  • 3.2 code practice question 2. Not in a rush.​
    15·1 answer
  • Nicole is in a study group to prepare for a test on plant biology, a subject she knows a lot about. During their meetings, she a
    12·2 answers
  • What is density?
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!