Respuesta :
Answer:
from calendar import monthrange
year = input()
month = input()
print(monthrange(year, month)[1])
Explanation:
You don't need to download calendar from pip, it's integrated with Python if you are using Python 3x. Hope this helps!
Answer:
def MYD():
from calendar import monthrange
month = int(input('enter the month number between 1 and 12: '))
if month >=13 or month <=0:
print('pleas try again')
return month
year = int(input('enter what is the year: '))
if month ==1:
name = 'January'
elif month ==2:
name = 'February'
elif month ==3:
name = 'March'
elif month == 4:
name = 'April'
elif month ==5:
name = 'June'
elif month ==6:
name = 'June'
elif month == 7:
name = 'July'
elif month ==8:
name = 'August'
elif month == 9:
name = 'September'
elif month ==10:
name = 'October'
elif month ==11:
name = 'November'
else:
name = 'December'
print('The', name,year,'has',monthrange(year, month)[1],'days')
MYD()
Explanation: