subject

Assignment 8: Calendar Create a calendar program that allows the user to enter a day, month and year in three separate variables. Then ask the user to select froma menu of choices using this formatting: Please enter a date Day: Month: Year: Menu: 1) Calculate the number of days in the given month. 2) Calculate the number of days left in the given year t must include the following functions: ter and returns a 1 if a year is a leap year et and O if it is not. This information will only be used by other functions umber of days: This subprogram will accept the date as parameters and return how many days are in the given monthe. the date as parameters and then calculate the number of days left in the year. This should not include the date the user entered in the count this is what I have so far:
def number_of_days(m):
if (m == 1,3,5,7,8,9,11):
woh = 31
elif (m == 2):
woh = 28
elif (m == 4,6,10,12):
woh = 30
print (woh)
print (29)

def days_left(d, m,y):
if (d > 0):
print ('135')
def leap_year(d, m,y):
if (d > 0):
print ('1')

day = int(input('Enter the day.'))
month = int(input('Enter the month.'))
year = int(input('Enter the year.'))
menu = int(input('Day in month or left in year? (1,2)'))
if (menu == 1):
monthdays = number_of_days(month)
print (monthdays)
elif (menu == 2):
dayleft = days_left(day, month, year)
print (dayleft)

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 02:50
Which of the following had the greatest influence on opening the internet to the generly public
Answers: 1
question
Computers and Technology, 22.06.2019 19:00
The fourth generation of computers emerged between 1970s and 1980s. which technological advancement brought about this generation of computers? which computer architecture was used most in this generation?
Answers: 3
question
Computers and Technology, 22.06.2019 21:00
The average cost of one year at a private college in 2012-2013 is $43,289. the average grant aid received by a student at a private college in 2012-2013 is $15,680.   what is the average student contribution for one year at a private college in 2012-2013?
Answers: 3
question
Computers and Technology, 22.06.2019 22:30
The qwerty keyboard is the most common layout of keys on a keyboard
Answers: 3
You know the right answer?
Assignment 8: Calendar Create a calendar program that allows the user to enter a day, month and year...
Questions
question
Mathematics, 23.10.2019 21:00
Questions on the website: 13722359