Assignment1.py
def checkDay(day, month, isLeap):
    '''
    Checks the day value entered and compares it against several checks to deturmine if the date is 
    acceptable. ie. Correct number of days in a given month and checked feb leap year. 

    Para:
            Day: Integer
            Month: Integer 
            isLeap: Boolean

    Returns:
            Boolean

    '''
    # months broken into lists corresponding with their maximum allowable days.
    days31 = [1, 3, 5, 7, 8, 10, 12]
    days30 = [4, 6, 9, 11]
    days28 = [2]

    # checks which list the input falls into and validates the value "day", an additional check is required 
    # for feb, as if the year entered is a leap year feb loses one day. 
    if month in days31:
        if day in range(1, 32):
            return True 
        else:
            return False 
    elif month in days30:
        if day in range(1, 31):
            return True 
        else:
            return False 
    elif month in days28:
        if isLeap == True:
            if day in range(1, 30):
                return True 
            else:
                return False 
        else:
            if day in range(1, 29):
                return True 
            else:
                return False

    Checks the day value entered and compares it against several checks to deturmine if the date is 
    acceptable. ie. Correct number of days in a given month and checked feb leap year. 

    Para:
            Day: Integer
            Month: Integer 
            isLeap: Boolean

    Returns:
            Boolean

    
Checks the day value entered and compares it against several checks to deturmine if the date is
acceptable. ie. Correct number of days in a given month and checked feb leap year.

Integer
Month: Integer
isLeap: Boolean
Checks the day value entered and compares it against several checks to deturmine if the date is acceptable . ie . Correct number of days in a given month and checked feb leap year . Integer Month : Integer isLeap : Boolean
def checkDay(day, month, isLeap):
    days31 = [1, 3, 5, 7, 8, 10, 12]
    days30 = [4, 6, 9, 11]
    days28 = [2]
    if month in days31:
        if day in range(1, 32):
            return True 
        else:
            return False 
    elif month in days30:
        if day in range(1, 31):
            return True 
        else:
            return False 
    elif month in days28:
        if isLeap == True:
            if day in range(1, 30):
                return True 
            else:
                return False 
        else:
            if day in range(1, 29):
                return True 
            else:
                return False
def checkDay ( day , month , isLeap ) : days31 = [ 1 , 3 , 5 , 7 , 8 , 10 , 12 ] days30 = [ 4 , 6 , 9 , 11 ] days28 = [ 2 ] if month in days31 : if day in range ( 1 , 32 ) : return True else : return False elif month in days30 : if day in range ( 1 , 31 ) : return True else : return False elif month in days28 : if isLeap == True : if day in range ( 1 , 30 ) : return True else : return False else : if day in range ( 1 , 29 ) : return True else : return False
Checks the day value entered and compares it against several checks to deturmine if the date is
acceptable.
Checks the day value entered and compares it against several checks to deturmine if the date is acceptable .
'''
    Checks the day value entered and compares it against several checks to deturmine if the date is 
    acceptable. ie. Correct number of days in a given month and checked feb leap year. 

    Para:
            Day: Integer
            Month: Integer 
            isLeap: Boolean

    Returns:
            Boolean

    ''' # months broken into lists corresponding with their maximum allowable days.
 # checks which list the input falls into and validates the value "day", an additional check is required 
 # for feb, as if the year entered is a leap year feb loses one day. 

None
day
month
isLeap