Just Weight and See


#1



https://www.codecademy.com/courses/python-beginner-en-qzsCL/1/2?curriculum_id=4f89dab3d788890003000096


I run my code and it appears to be calculating correctly, but I get the following error when I run my code. How do I round it to 2dp?

get_average(alice) returned [91.14999999999999] instead of the expected 91.15


def get_average(student):
    homework = average(student["homework"])
    quizzes = average(student["quizzes"])
    tests = average(student["tests"])
    grade = [(homework * 0.1) + (quizzes * 0.3) + (tests * 0.6)]
    return grade


#2

your grade should be an integer, not a list


#3

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