Computers and Technology
Computers and Technology, 05.04.2020 20:50, edamite12

I please need the answer to Assignment 8: Calendar langauge python, here is the question:

Instructions
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 number of days left. This should not include the date the user entered in the count.
Note: Make sure to name the functions and pass the parameters exactly in the order specified.

Sample Run 1
Please enter a date
Day: 5
Month: 5
Year: 1984
Menu:
1) Calculate the number of day in the given month.
2) Calculate the number of days left in the given year.
1
31
Sample Output 1
Please enter a date
Menu:
1) Calculate the number of day in the given month.
2) Calculate the number of days left in the given year.
31
Sample Run 2
Please enter a date
Day: 21
Month: 6
Year: 2016
Menu:
1) Calculate the number of day in the given month.
2) Calculate the number of days left in the given year.
2
193
Sample Output 2
Please enter a date
Menu:
1) Calculate the number of day in the given month.
2) Calculate the number of days left in the given year.
193

answer
Answers: 2

Other questions on the subject: Computers and Technology

image
Computers and Technology, 21.06.2019 22:00, luisanavarrogarcia
Which of the following statements correctly identifies a problem with sanitization methods? a. methods are not available to remove data ensuring that unauthorized personnel cannot retrieve data. b. even fully incinerated media can offer extractable data. c. personnel can perform sanitization steps improperly. d. stored data is physically etched into the media.
Answers: 1
image
Computers and Technology, 23.06.2019 01:20, shiann2002
Me with this program in c++ ! computers represent color by combining sub-colors red, green, and blue (rgb). each sub-color's value can range from 0 to 255. thus (255, 0, 0) is bright red. (130, 0, 130) is a medium purple. (0, 0, 0) is black, (255, 255, 255) is white, and (40, 40, 40) is a dark gray. (130, 50, 130) is a faded purple, due to the (50, 50, 50) gray part. (in other word, equal amounts of red, green, blue yield gray).given values for red, green, and blue, remove the gray part. ex: if the input is 130 50 130, the output is: 80 0 80. thus, find the smallest value, and then subtract it from all three values, thus removing the gray.
Answers: 3
image
Computers and Technology, 23.06.2019 15:20, yeahmaneee
What does a bonus object do? a. subtracts lives b. keeps track of a player's health c. gives a player an advantage d. makes text appear
Answers: 1
image
Computers and Technology, 23.06.2019 17:30, kenyasutton10
What are the most commonly found items in the trash according to the municipal solid waste report?
Answers: 1
Do you know the correct answer?
I please need the answer to Assignment 8: Calendar langauge python, here is the question:

Questions in other subjects:

Konu
English, 19.05.2020 14:58