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
• Again, you must work towards the solution a little at a time

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 17:00
1. so if i wanted to build a linux server for web services(apache) with 1cpu and 2 gb of memory.-operating at 75% of memory capacity2. a windows server with 2 cpu/ 4gb memory- operating at 85% of memory capacity3. a storage server with 1 cpu/ 2gb memory- operating at 85% of memory capacityhow much memory do i have to add for each server.so that the utilization rate for both cpu and memory is at a baseline of 60%."the details for the cpu like its processor or the memory's speed isnt to be concerned" yeah i kept asking my teacher if he's even sure about the but the whole class seems to be confused and the project is due in 3 days..this is a virtualization project where i have to virtualize a typical server into an exsi hypervisor.
Answers: 2
question
Computers and Technology, 22.06.2019 22:00
During physical science class ben and jerry connected three identical lightbulbs in parallel to a battery where happens when ben removes one of the lightbulbs from it’s socket
Answers: 2
question
Computers and Technology, 23.06.2019 19:30
Anul 2017 tocmai s-a încheiat, suntem trişti deoarece era număr prim, însă avem şi o veste bună, anul 2018 este produs de două numere prime, 2 şi 1009. dorel, un adevărat colecţionar de numere prime, şi-a pus întrebarea: “câte numere dintr-un interval [a,b] se pot scrie ca produs de două numere prime? “.
Answers: 3
question
Computers and Technology, 24.06.2019 11:00
These statements describe lists in presentation programs: a. bullets can be turned off and on. b. bullets cannot be turned off. c. bullet styles, colors, and sizes can be changed. d. lists don't have to use bullets or numbers. e. numbering styles, colors, and sizes can be changed. f. numbers can be turned off and on. g. numbers cannot be turned off. select all that apply
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
Questions on the website: 13722360