This is my assignment
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.
this is what i have come up with but it doesn't work properly i've tried everything i can think off or have learned.
Any help would be appreciated
Thank You this is my first time posting here i will read the document
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.
this is what i have come up with but it doesn't work properly i've tried everything i can think off or have learned.
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) 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('1) Calculate the number of days in a given month or 2) Calculate the number of Day 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)when i run this it asks all the right questions but doesn't calculate properly?
Any help would be appreciated
Thank You this is my first time posting here i will read the document