Write a program called 'printmonth.py' that asks the user for a month name and start day...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
Write a program called 'printmonth.py' that asks the user for a month name and start day and then prints the calendar for that month in a 6 row by 7 column grid. (Ignoring issues of leap years, assume February has 28 days). Your calendar should cater for conditions whereby the user has entered an incorrect name of a month and/or a start date (See the sample 10 below). Sample 10 (The input from the user is shown in bold font-do not program this): Enter the name of a month (e.g. January,..., December): September Enter the start day (1 for Monday, 7 for Sunday) : 4 September Mo Tu We Th Fr Sa Su 1 2 3 4 8 9 10 11 5 6 7 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 Sample 10 (The input from the user is shown in bold font-do not program this): Enter the name of a month (e.g. January,..., December): June Enter the start day (1 for Monday, 7 for Sunday): 9 Invalid calendar: you have either entered an incorrect month name or start day. Sample 10 (The input from the user is shown in bold font-do not program this): Write a program called 'printmonth.py' that asks the user for a month name and start day and then prints the calendar for that month in a 6 row by 7 column grid. (Ignoring issues of leap years, assume February has 28 days). Your calendar should cater for conditions whereby the user has entered an incorrect name of a month and/or a start date (See the sample 10 below). Sample 10 (The input from the user is shown in bold font-do not program this): Enter the name of a month (e.g. January,..., December): September Enter the start day (1 for Monday, 7 for Sunday) : 4 September Mo Tu We Th Fr Sa Su 1 2 3 4 8 9 10 11 5 6 7 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 Sample 10 (The input from the user is shown in bold font-do not program this): Enter the name of a month (e.g. January,..., December): June Enter the start day (1 for Monday, 7 for Sunday): 9 Invalid calendar: you have either entered an incorrect month name or start day. Sample 10 (The input from the user is shown in bold font-do not program this):
Expert Answer:
Answer rating: 100% (QA)
Answer import calendar def printmonthcalendarmonth startday try mon... View the full answer
Related Book For
Posted Date:
Students also viewed these programming questions
-
Taos Company's record of transactions concerning part X for the month of April was as follows. Instructions (a) Compute the inventory at April 30 on each of the following bases. Assume that perpetual...
-
Company Advertising ($ billions) Company Advertising (5 billions) A A 5.40 G 2.29 B 3.48 2.35 c 2.41 1 1.79 D 2.66 3 1.67 E E 2.24 K 2.36 F 2.44 L 1.58 (a) What the mean amount (in billion dollars)...
-
Brothers Flooring Two brothers, Ali and Abbas Hamdouni have started a flooring business installing tiles, laminate and hardwood floors in residential units. From their start they have been very keen...
-
May-22 1 1 1 6 22 31 31 31 31 31 uChampion (UC) Shop commenced business on 1 May 2022. The following transactions occurred during the first month of operations: Jenny, the owner, invested cash into...
-
Why should everyone study accounting whether they are going to be an accountant or not?
-
Prove the addition formula for spherical harmonics, (17.47). Data From Equation 17.47:- m=-1 (lm)(lm ') = Ym(n)Y(')= -P( '). 21+1 4 (17.47) m=-1
-
Do you fit within the profile or characteristics of a white collar criminal? Explain.
-
(Carry back and Carry forward of NOL, No Valuation Account, No Temporary Differences) The pretax financial income (or loss) figures for Synergetic Company are as follows....
-
Assume that in October 2022 the Schmidt Machinery Company(Exhibit 14.1) manufactured and sold 910 units for $770 each.During this month, the company incurred $509,600 total variablecosts and $181,5 2...
-
In 2018, John and Shannon O'Banion, who live at 3222 Pinon Drive, Mesa, CO 81643, file as married filing jointly. John's social security number is 412-34-5670 (date of birth 5/12/1980), and Shannons...
-
You are advising the owner of a 100k sf warehouse built in 2005 as to whether they should Hold or Sell the property The property is fully occupied by a single tenant on 10yr lease from Jan 2015...
-
True or False. The system stiffness matrix is always singular unless the boundary conditions are incorporated.
-
True or False. The system mass matrix is always singular unless the boundary conditions are incorporated.
-
Name some sources of industrial vibration.
-
An example of a source of vibration that cannot be altered is: a. atmospheric turbulence b. hammer blow c. tire stiffness of a car
-
True or False. The vibration caused by a rotating unbalanced disc can be eliminated by adding a suitable mass to the disc.
-
Captial structure defines the: A. total amount of debt in an organization. B. total amount of long-term debit in an organization. C. total amount of assets in an organization. D. the proportion of...
-
Explain five different cases of income exempt from tax with clear examples.
-
Use recursion to implement a method public static boolean find(String str, String match) that tests whether match is contained in str: boolean b = find("Mississippi", "sip"); // Sets b to true Hint:...
-
Write a program that displays your name inside a box on the screen, like this: Dave Do your best to approximate lines with characters such as | - +.
-
Write a program that reads a number and displays the square, cube, and fourth power. Use the Math.pow method only for the fourth power.
-
Generate a regression dataset by sampling a function from a GP prior and then adding some noise. Use ABC to sample from the posterior. Each sample should be generated by first sampling from the GP...
-
For the mixture model where each component is a one-dimensional Gaussian with variance 1 , show that the conditional distribution for the mean of the \(k\) th mixture component is that given by...
-
Implement the Gibbs sampler for the mixture model. Compute \(\hat{R}\) and the autocorrelation of the component means \(\mu_{k}\). How many samples are required for convergence? How much should the...
Study smarter with the SolutionInn App