Question
the hint they gave was this function modifies the original list and does not return anything. We also need to take into account when we
the hint they gave was this function modifies the original list and does not return anything. We also need to take into account when we send an empty dictionary.
def letter_grades(adict): """ Modifies the new dictionary to replace numerical grades with letter grades. The dictionary adict has netids for keys and numbers 0-100 for values. These represent the grades that the students got on the exam. This function replaces all of the numerical grades with letter grades (strings) for values. Our cut-off is 90 for an A, 80 for a B, 70 for a C, 60 for a D. Anything below 60 is an F. Examples: If a = {'wmw2' : 55, 'abc3' : 90, 'jms45': 86}, letter_grades(a) changes a to {'wmw2' : 'F, 'abc3' : 'A', 'jms45': 'B'}. If a = {} letter_grades(a) changes a to {} Parameter adict: the dictionary of grades Precondition: adict is dictionary mapping strings to ints """ pass
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started