homework.py
def main(argv):
    '''
    Main entry point to call modules/functions to solve the exercises
    '''
    exercise = ''
    letter = ''
    reduced = False
    try:
        opts, _ = getopt.getopt(argv, "he:l:r:",
                                ["exercise=", "letter=", "reduced="])
    except getopt.GetoptError:
        print('homework.py -e <exercise> -l <letter> -r <reduced>')
        sys.exit(2)
    for opt, arg in opts:
        if opt in ('-e', '--exercise'):
            exercise = arg
        elif opt in ('-l', '--letter'):
            letter = arg
        elif opt in ('-r', '--reduced'):
            if arg.lower() in ('1', 'true', 't'):
                reduced = True
            elif arg.lower() in ('0', 'false', 'f'):
                reduced = False
    if not exercise or not letter:
        print('homework.py -e <exercise> -l <letter> -r <reduced>')
        sys.exit(2)
    dispatcher(exercise, letter, reduced)

    Main entry point to call modules/functions to solve the exercises
    
Main entry point to call modules/functions to solve the exercises
Main entry point to call modules / functions to solve the exercises
def main(argv):
    exercise = ''
    letter = ''
    reduced = False
    try:
        opts, _ = getopt.getopt(argv, "he:l:r:",
                                ["exercise=", "letter=", "reduced="])
    except getopt.GetoptError:
        print('homework.py -e <exercise> -l <letter> -r <reduced>')
        sys.exit(2)
    for opt, arg in opts:
        if opt in ('-e', '--exercise'):
            exercise = arg
        elif opt in ('-l', '--letter'):
            letter = arg
        elif opt in ('-r', '--reduced'):
            if arg.lower() in ('1', 'true', 't'):
                reduced = True
            elif arg.lower() in ('0', 'false', 'f'):
                reduced = False
    if not exercise or not letter:
        print('homework.py -e <exercise> -l <letter> -r <reduced>')
        sys.exit(2)
    dispatcher(exercise, letter, reduced)
def main ( argv ) : exercise = '' letter = '' reduced = False try : opts , _ = getopt . getopt ( argv , "he:l:r:" , [ "exercise=" , "letter=" , "reduced=" ] ) except getopt . GetoptError : print ( 'homework.py -e <exercise> -l <letter> -r <reduced>' ) sys . exit ( 2 ) for opt , arg in opts : if opt in ( '-e' , '--exercise' ) : exercise = arg elif opt in ( '-l' , '--letter' ) : letter = arg elif opt in ( '-r' , '--reduced' ) : if arg . lower ( ) in ( '1' , 'true' , 't' ) : reduced = True elif arg . lower ( ) in ( '0' , 'false' , 'f' ) : reduced = False if not exercise or not letter : print ( 'homework.py -e <exercise> -l <letter> -r <reduced>' ) sys . exit ( 2 ) dispatcher ( exercise , letter , reduced )
Main entry point to call modules/functions to solve the exercises
Main entry point to call modules / functions to solve the exercises
'''
    Main entry point to call modules/functions to solve the exercises
    '''
argv