Computers and Technology

Create a calendar program that allows the user to enter a day, month, and year in three separate variables as shown below.

Please enter a date
Day:
Month:
Year:
Then, ask the user to select from a menu of choices using this formatting:

Menu:
1) Calculate the number of days in the given month.
2) Calculate the number of days left in the given year.
The program must include the following functions:

leap_year: Takes the year as a parameter and returns 1 if a year is a leap year (Links to an external site.) and 0 if it is not. This information will only be used by other functions.
number_of_days: This subprogram will accept two parameters in the following order: month and year. It will return how many days are in the given month (Links to an external site.).
days_left: This will accept three parameters in the following order: day, month, and year. It should calculate the number of days left in the year, and return the value of a number of days left. This should not include the date the user entered in the count.

answer
Answers: 1

Other questions on the subject: Computers and Technology

image
Computers and Technology, 21.06.2019 22:30, klk597703
Aprovides legal protection for something an individual has created
Answers: 1
image
Computers and Technology, 23.06.2019 07:30, Morganwing1019
To check spelling errors in a document, the word application uses the to determine appropriate spelling. internet built-in dictionary user-defined words other text in the document
Answers: 2
image
Computers and Technology, 23.06.2019 07:50, kmart4062
Apython programming question: assume s is a string of lower case characters. write a program that prints the number of times the string 'bob' occurs in s. for example, if s = 'azcbobobegghakl', then your program should print number of times bob occurs is: 2
Answers: 3
image
Computers and Technology, 23.06.2019 11:30, kyraj21
Which excel file extension stores automated steps for repetitive tasks?
Answers: 1
Do you know the correct answer?
Create a calendar program that allows the user to enter a day, month, and year in three separate var...

Questions in other subjects:

Konu
Mathematics, 03.02.2022 08:50
Konu
Computers and Technology, 03.02.2022 08:50