# Oops, try again! The grades variable should contain a list of grades

#1

Hello all,

Wondered if anyone has seen this issue before.

I'm stuck in Exam Statistics Review - Section 9. All my functions look good and print properly however, I keep getting this error message whenever I Save & Submit code.

I've printed the grades list before and after printing the function values. Please help.

The output of my functions and code are as follows:
[100, 100, 90, 40, 80, 100, 85, 70, 90, 65, 90, 85, 50.5] << - grades =
100
100
90
40
80
100
85
70
90
65
90
85
50.5
1045.5 << - Sum of the grades
80.4230769231 << - Average
334.071005917 << - Variance
18.2776094147 << - Standard Deviation
[100, 100, 90, 40, 80, 100, 85, 70, 90, 65, 90, 85, 50.5] << -- grades variable to make sure it wasn't damaged
None

My code follows:
grades = [100, 100, 90, 40, 80, 100, 85, 70, 90, 65, 90, 85, 50.5]

for grade in scores:
return

total = 0
for grade in scores:

average = sum_of_grades / float(len(scores))
return average

variance = 0.00
sc = 0
for score in scores:
variance = variance + (average - score) ** 2
sc += 1
variance = variance / sc
return variance

return (variance ** 0.5)

#2

Well, I haven't been able to quite finish this, but it looks that you are missing a line in your code that calculates the variance for you:

return (variance ** 0.5)