def average_grade(adict): Returns the average grade among all students. The dictionary adict has netids for
Fantastic news! We've Found the answer you've been seeking!
Question:
def average_grade(adict):
"""
Returns the average grade among all students.
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
averages those grades and returns a value.
Examples:
average_grade({'wmw2' : 55, 'abc3' : 90, 'jms45': 86}) returns (55+90+86)/3 = 77
average_grade({'wmw2' : 55}) returns 55
average_grade({}) returns 0
Parameter adict: the dictionary of grades
Precondition: adict is dictionary mapping strings to ints
"""
Related Book For
Data Analysis and Decision Making
ISBN: 978-0538476126
4th edition
Authors: Christian Albright, Wayne Winston, Christopher Zappe
Posted Date: