Traceback (most recent call last):

File "python", line 26, in

NameError: name 'variance' is not defined

Can anyone please help me solve this?

```
def print_grades(grades):
for grade in grades:
print grade
def grades_sum(grades):
total = 0
for grade in grades:
total += grade
return total
def grades_average(grades):
sum_of_grades = grades_sum(grades)
average = sum_of_grades / float(len(grades))
return average
def grades_variance(scores):
average=grades_average(grades)
variance=0
for score in scores:
diff= (average-score)**2
variance=variance+diff
return variance
total_variance=variance/len(scores)
print grades_variance(grades)
```