# Number of days per month. First value placeholder for indexing purposes.month_days=[0,31,28,31,30,31,30,31,31,30,31,30,31]defis_leap(year):"""Return True for leap years, False for non-leap years."""returnyear%4==0and(year%100!=0oryear%400==0)defdays_in_month(year,month):"""Return number of days in that month in that year."""# year 2017# month 2ifnot1<=month<=12:return'Invalid Month'ifmonth==2andis_leap(year):return29returnmonth_days[month]print(days_in_month(2017,2))