For some reason every time I run the code it takes the sum of all of the grades in the original grades list(1045.5) and divides them by the amount of numbers in the auto generated test list. I know this is probably something simple but I don't see what I'm doing wrong. Added entire code in case it's an issue with original sum code.
I get similar error messages every time I run my code to the following:
Oops, try again. grades_average([8, 2, 6, 6, 4, 7, 3]) returned 149.35714285714286 instead of the expected: 5.142857142857143
grades = [100, 100, 90, 40, 80, 100, 85, 70, 90, 65, 90, 85, 50.5] def grades_sum(scores): total = 0 for x in scores: total += x return total def grades_average(y): a = 0 a = grades_sum(grades) / float(len(y)) return a print grades_sum(grades) print grades_average(grades)