<s> lloyd = { <EOL> "<STR_LIT:name>" : "<STR_LIT>" , <EOL> "<STR_LIT>" : [ <NUM_LIT> , <NUM_LIT> , <NUM_LIT> , <NUM_LIT> ] , <EOL> "<STR_LIT>" : [ <NUM_LIT> , <NUM_LIT> , <NUM_LIT> ] , <EOL> "<STR_LIT>" : [ <NUM_LIT> , <NUM_LIT> ] <EOL> } <EOL> alice = { <EOL> "<STR_LIT:name>" : "<STR_LIT>" , <EOL> "<STR_LIT>" : [ <NUM_LIT> , <NUM_LIT> , <NUM_LIT> , <NUM_LIT> ] , <EOL> "<STR_LIT>" : [ <NUM_LIT> , <NUM_LIT> , <NUM_LIT> ] , <EOL> "<STR_LIT>" : [ <NUM_LIT> , <NUM_LIT> ] <EOL> } <EOL> tyler = { <EOL> "<STR_LIT:name>" : "<STR_LIT>" , <EOL> "<STR_LIT>" : [ <NUM_LIT:0.0> , <NUM_LIT> , <NUM_LIT> , <NUM_LIT> ] , <EOL> "<STR_LIT>" : [ <NUM_LIT:0.0> , <NUM_LIT> , <NUM_LIT> ] , <EOL> "<STR_LIT>" : [ <NUM_LIT> , <NUM_LIT> ] <EOL> } <EOL> def average ( numbers ) : <EOL> total = sum ( numbers ) <EOL> total = float ( total ) / float ( len ( numbers ) ) <EOL> return total <EOL> def get_average ( student ) : <EOL> homework = average ( student [ "<STR_LIT>" ] ) * <NUM_LIT:0.1> <EOL> quizzes = average ( student [ "<STR_LIT>" ] ) * <NUM_LIT> <EOL> tests = average ( student [ "<STR_LIT>" ] ) * <NUM_LIT> <EOL> avrg = homework + quizzes + tests <EOL> return avrg <EOL> def get_letter_grade ( score ) : <EOL> if score >= <NUM_LIT> : <EOL> return '<STR_LIT:A>' <EOL> elif score >= <NUM_LIT> : <EOL> return '<STR_LIT:B>' <EOL> elif score >= <NUM_LIT> : <EOL> return '<STR_LIT:C>' <EOL> elif score >= <NUM_LIT> : <EOL> return '<STR_LIT:D>' <EOL> else : <EOL> return '<STR_LIT:F>' </s>
