Prime Dates

  • + 0 comments

    The problem should include the rules for leap years as part of the instructions. Here is the correct version of the leap year code.

    def updateLeapYear(year):
        if year % 400 == 0:
            month[2] = 29
        elif year % 100 == 0:
            month[2] = 28
        elif year % 4 == 0:
            month[2] = 29
        else:
            month[2] = 28