subject

The goal of this program is to have a program print out a perfectly formatted 12-month calendar based on two input values.
The program must follow these requirements:
• Must have only two inputs:
o First the program will ask for an integer for the year of the calendar using the following text:
▪ "Enter a year:"
o Second the program will ask for an integer that represents the day of the week that January 1 will begin
on, (ex. Sunday = 0, Monday = 1, Tuesday = 2, etc.), using the following text:
▪ "Enter the first day of the year, (ex. Sunday = 0, Monday = 1, Tuesday = 2, etc.):"
o The program should continue to ask for the second input if it does not fall between 0 and 6.
• It must include a function with the name "month_details".
o This function will have to have two parameters:
▪ One will be an integer representing what month it is
▪ Second will be an integer representing what year The calendar is.
o This function will return two values in a tuple:
▪ One return value is a string with the name of the month
▪ Second will be an integer representing how many days are in that month
o This function will use the two integer parameters and decide what values to return for the name of the
month and how many days are in that month (30, 31, 28, or 29)
• The program will need to use loops (either "while" or "for" or both)
• The program will need to use several "if" statements. Some maybe just "if", some "if/else", and some "if/elif"
• Each month will be like the bellow example:
January - 2021

Sun Mon Tue Wed Thu Fri Sat
1 2
3 4 5 6 7 8 9
10 11 12 13 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28 29 30
31

February - 2021

Sun Mon Tue Wed Thu Fri Sat
1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28

Cont. until Dec.

December - 2021

Sun Mon Tue Wed Thu Fri Sat
1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31

• Each month will follow these requirements:
o Month name and year needs to be approximately centered over the month calendar
o Must be a line of hyphens under the month name
o Must print the 3-letter weekday abbreviation
o The number must appear right justified under the appropriate weekday
o Numbers must be perfectly lined up
o Each month must start under the appropriate day of the week
o This means you have to print some spaces each month before you print the number 1
• Everything must line up in nice columns using a width of approximately 4-7 spaces
• You will want to use both regular "print" statements as well as some format "print" statements
o print('Hello World!')
o print('{:15s}'.format('Hello World!'))
• The whole program, including the function, must be done in under 150 lines of code.
o The whole program can actually be done in under 90 lines of code
• You may NOT use any type of array or list

Hints:
• Take your time and build the program a little at a time
o Do iterative programming, create one solution then another and another etc.
o Keep running your code a little bit at a time to see the new results with the new code you just added
o DO NOT try to write the whole program at once
o Best to try and get just the month of January to print out correctly first using "loops" and "if" statements
and "print" statements
• This program will have several loops
• You need to keep track of three major things
o What month
o What day of the week
o What day of the month
• You will call the function each time you begin a new month

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 09:00
Create a cell reference in a formula by typing in the cell name or         a. right-clicking the cell. b. clicking the cell. c. clicking the column where the cell is located. d. clicking the row where the cell is located.
Answers: 1
question
Computers and Technology, 22.06.2019 11:00
What are two of the most common reasons that peolpe who need mental health care do not access it?
Answers: 1
question
Computers and Technology, 22.06.2019 19:30
When creating a presentation in libre office impress, where does the editing of slides take place? a. the slides panel b. the center panel c. the tasks panel, under the masters pages tab d. the tasks panel, under the layouts tab
Answers: 1
question
Computers and Technology, 24.06.2019 00:30
Which boolean operator enables you to exclude a search term? a} not b} and c} or d} plus
Answers: 1
You know the right answer?
The goal of this program is to have a program print out a perfectly formatted 12-month calendar base...
Questions
question
Mathematics, 13.12.2021 20:30
question
Mathematics, 13.12.2021 20:30
question
Mathematics, 13.12.2021 20:30
question
History, 13.12.2021 20:30
question
English, 13.12.2021 20:30
question
Mathematics, 13.12.2021 20:30
question
Social Studies, 13.12.2021 20:30
Questions on the website: 13722363