def num_days_months(y):
    """
      For a given year, provide the number of days of each month.
    """
    ndays = [31,28,31,30,31,30,31,31,30,31,30,31]
    if y%4 == 0:
       ndays[1] = 29
    return ndays