How's everybody doing error


#1




error- Oops, try again. One of the following is missing or broken when we tried to use it: alice, lloyd, tyler, students, get_class_average, get_letter_grade


def average(numbers):
    sum(numbers)
    total=sum(numbers)
    x=float(total)/len(numbers)
    return x
    
def get_average(student):
    homework=student["homework"]
    quizzes=student["quizzes"]
    tests=student["tests"]
    x=average(homework)*0.1+average(quizzes)*0.3+average(tests)*0.6
    return x
    
def get_letter_grade(score):
    if score>=90:
        return "A"
    elif score>=80:
        return "B"
    elif score>=70:
        return "C"
    elif score>=60:
        return "D"
    else:
        return "F"
    print get_letter_grade(get_average(lloyd))
    
    
    
def get_class_average(class_list):
    class_list = [lloyd, alice, tyler]
    results = []
    for l in class_list:
        results.append(get_average(l))
    return average(results)    
    
    print (get_class_average(class_list))
    print (get_letter_grade(average(results)))


#2

def get_class_average(students):
results = []
for student in students:
results.append(get_average(student))
return average(results)
print get_class_average(students)
print get_letter_grade(get_class_average(students))

try that it should work:)


#3

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.