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 16:00
Why should characters such as / \ " ' * ; - ? [ ] ( ) ~ ! $ { } < > # @ & | space, tab, and newline be avoided in file names?
Answers: 2
question
Computers and Technology, 24.06.2019 06:00
Hey i really need some solving this problem: 1. encrypt this binary string into cipher text: 110000. include in your answer the formula the decoder would use to decrypt your cipher text in the format (coded answer) x n mod (m) = y & 2. decrypt this cipher text into a binary string: 106 you.
Answers: 2
question
Computers and Technology, 24.06.2019 11:20
Every telecommunication setup uses two devices: one device to transmit data and one device to receive data. which device transmits frequencies to mobile phones? towers transmit frequencies to mobile phones.
Answers: 1
question
Computers and Technology, 24.06.2019 13:00
George heard about the benefits of a data warehouse. he wants to try implementing one for his organization. however, he is afraid that transferring data to the data warehouse will affect transaction time. which element ensures that transactions are not affected when moving data to a warehouse? when data is transferred to a data warehouse, the a area frees the source system to continue transaction processing.
Answers: 2
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, 05.04.2021 19:30
question
Mathematics, 05.04.2021 19:30
question
Geography, 05.04.2021 19:30
Questions on the website: 13722359