Question: def leap _ year ( y ) : if y % 4 = = 0 : return 1 else: return 0 def number _ of
def leapyeary:
if y :
return
else:
return
def numberofdaysmy:
if m :
return leapyeary
elif m or m or m or m or m or m or m :
return
elif m or m or m or m :
return
def daysmd:
if m :
return d
if m :
return d
if m :
return d
if m :
return d
if m :
return d
if m :
return d
if m :
return d
if m :
return d
if m :
return d
if m :
return d
if m :
return d
if m :
return d
def daysleftdmy:
if daysmd:
return daysmd leapyeary
else:
return daysmd
printPlease enter a date"
dayintinputDay:
monthintinputMonth:
yearintinputYear:
choiceintinputMenu:
Calculate the number of days in the given month.
Calculate the number of days left in the given year.
if choice :
printnumberofdaysmonth year
if choice :
printdaysleftdaymonth,year
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
