Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

write in python Please create a structure chart of the entire calendar program. This must include every function you will write and all the parameters

write in python

Please create a structure chart of the entire calendar program. This must include every function you will write and all the parameters that will be passed. Your structure chart needs to conform to the guidelines described in the reading.

Pseudocode

Please create pseudocode for one important and nontrivial function in your program. The pseudocode for an additional function is provided.

Please create the following for this assignment:

  1. A structure chart of the overall design
  2. Pseudocode of one function that is part of the structure chart but different than the flowchart one.
  3. Flowchart of one function that is part of the structure chart but different than the pseudocode one.

Please write in python. Use functions to create the calendar.

Create a calendar with functions for any month of any year from 1753 forward. This is the first lab of a two-part sequence:

This program is similar to the cal utility on the Linux system. Prompt the user for the numeric month and year to be displayed, as shown in the example below.

Enter a month number: 1 Enter year: 1753 Su Mo Tu We Th Fr Sa 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 

Input

When the program prompts the user for a month, only the values 1 through 12 are accepted. Any other input will yield a re-prompt:

Enter a month number: 13 Month must be between 1 and 12. Enter a month number: banana Month must be an integer. Enter a month number: 1

display_table(dow, num_days) PUT table header (SU MO TU ) FOR i  0  dow PUT four spaces FOR dom  1  num_days PUT dom dow += 1 IF dow MOD 7 = 0 PUT newline IF dow MOD 7  0 PUT newline END 

In the above algorithm, the first parameter is the number of days in a given month. We would expect this to be 28, 29, 30, or 31, but you can see that the algorithm will work for any number of days. The second parameter is the day of the week (dow). This corresponds to the day of the week for the first day of the month. Sunday is (dow==0), Monday is (dow==1) and Saturday is (dow==6). Also, "dom" is "day of month" and "dow" is "day of week."

You can draw by hand just make sure the functions are well drawn and written.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Development For Dummies

Authors: Allen G. Taylor

1st Edition

978-0764507526

More Books

Students also viewed these Databases questions

Question

=+ d. a professor deciding how much to prepare for class

Answered: 1 week ago