Assignment1.py
def fixDate(date):
    '''
    Converts the string value a participants birthdate into a string of numbers. ie. Feb == 02, 
    will also convert single digit values into double digit, ie 2 becomes 02. Will return a string 
    of the following format, 'YYYYMMDD'

    Para: 
            date: string

    Returns:
            date: string
    '''
    months = ['Jan', "Feb", 'Mar', \
            'Apr', 'May', 'Jun', \
            'Jul', 'Aug', 'Sep', \
            'Oct', 'Nov', 'Dec']

    date = date.split()
    date[0] = str(months.index(date[0]) + 1 )
    if len(date[0]) < 2:
        date[0] = '0' + str(date[0])

    if len(str(date[1])) < 2:
        date[1] = '0' + str(date[1])
    date = [date[2], date[0], date[1]]
    date = ' '.join(date)
    return date

    Converts the string value a participants birthdate into a string of numbers. ie. Feb == 02, 
    will also convert single digit values into double digit, ie 2 becomes 02. Will return a string 
    of the following format, 'YYYYMMDD'

    Para: 
            date: string

    Returns:
            date: string
    
Converts the string value a participants birthdate into a string of numbers. ie. Feb == 02,
will also convert single digit values into double digit, ie 2 becomes 02. Will return a string
of the following format, 'YYYYMMDD'

string
Converts the string value a participants birthdate into a string of numbers . ie . Feb == 02 will also convert single digit values into double digit ie 2 becomes 02 . Will return a string of the following format ' YYYYMMDD ' string
def fixDate(date):
    months = ['Jan', "Feb", 'Mar', \
            'Apr', 'May', 'Jun', \
            'Jul', 'Aug', 'Sep', \
            'Oct', 'Nov', 'Dec']
    date = date.split()
    date[0] = str(months.index(date[0]) + 1 )
    if len(date[0]) < 2:
        date[0] = '0' + str(date[0])
    if len(str(date[1])) < 2:
        date[1] = '0' + str(date[1])
    date = [date[2], date[0], date[1]]
    date = ' '.join(date)
    return date
def fixDate ( date ) : months = [ 'Jan' , "Feb" , 'Mar' , 'Apr' , 'May' , 'Jun' , 'Jul' , 'Aug' , 'Sep' , 'Oct' , 'Nov' , 'Dec' ] date = date . split ( ) date [ 0 ] = str ( months . index ( date [ 0 ] ) + 1 ) if len ( date [ 0 ] ) < 2 : date [ 0 ] = '0' + str ( date [ 0 ] ) if len ( str ( date [ 1 ] ) ) < 2 : date [ 1 ] = '0' + str ( date [ 1 ] ) date = [ date [ 2 ] , date [ 0 ] , date [ 1 ] ] date = ' ' . join ( date ) return date
Converts the string value a participants birthdate into a string of numbers.
Converts the string value a participants birthdate into a string of numbers .
'''
    Converts the string value a participants birthdate into a string of numbers. ie. Feb == 02, 
    will also convert single digit values into double digit, ie 2 becomes 02. Will return a string 
    of the following format, 'YYYYMMDD'

    Para: 
            date: string

    Returns:
            date: string
    '''
None
date
date