subject

In Python

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.

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 06:30
Exchanging which type of data uses the least bandwidth? music photographs video voice bandwidth- the amount of data that can be moved between two points in a set time period
Answers: 1
question
Computers and Technology, 22.06.2019 14:30
Create a pseudocode design to prompt a student for their student id and the titles of the three classes they want to add. the solution should display the student’s id and a total bill. • bill a student using the following rules: o students can only add up to 3 classes at a time.
Answers: 3
question
Computers and Technology, 22.06.2019 15:20
The north and south regions had very diferent economies in the 1800s.
Answers: 1
question
Computers and Technology, 22.06.2019 22:50
Assume the existence of a bankaccount class. define a derived class, savingsaccount that contains two instance variables: the first a double, named interestrate, and the second an integer named interesttype. the value of the interesttype variable can be 1 for simple interest and 2 for compound interest. there is also a constructor that accepts two parameters: a double that is used to initialize the interestrate variable, and a string that you may assume will contain either "simple", or "compound", and which should be used to initialize the interesttype variable appropriately. there should also be a pair of functions getinterestrate and getinteresttype that return the values of the corresponding data members (as double and int respectively).
Answers: 2
You know the right answer?
In Python

Create a calendar program that allows the user to enter a day, month, and year...
Questions
question
Social Studies, 04.08.2019 08:20
question
Mathematics, 04.08.2019 08:20
Questions on the website: 13722363