# 9/9 Help

grades = [100, 100, 90, 40, 80, 100, 85, 70, 90, 65, 90, 85, 50.5]

total = 0

return average

variance = 0
for score in grades:
variance += ((average - score) ** 2)
return variance

return variance**0.5

print “The sum of all the grade is: %s” % grades_sum(grades)
print “The average of all the grades is: %s” % grades_average(grades)
print “The variance of the grades is: %s” % grades_variance(grades)
print “The standard deviation of the grades are: %s” % grades_std_deviation(variance)

Oops, try again. It looks like the sum of grades was not printed! Make sure you are printing it on its own line.

Try this

``````print grades_sum(grades)
``````

point it just print everything without the statements

Did it work?

1 Like

Yes, thank you. I was trying to add details but I guess not. Thank you Hello.

I am having the same exact problem. My code is the next one:

grades = [100, 100, 90, 40, 80, 100, 85, 70, 90, 65, 90, 85, 50.5]

total = 0

return average

variance = 0
for score in grades:
variance += ((average - score) ** 2)
return variance

return variance**0.5

The results I get are:

100
100
90
40
80
100
85
70
90
65
90
85
50.5
1045.5
80.4230769231
69.0504943648
8.30966271065
None

And I get an error message like the next one: Oops, try again. It looks like the sum of grades was not printed! Make sure you are printing it on its own line. The print_grades(grades) has no print statement before it to avoid a double print command (there is one inside th function).

How could I solve it? I am stuck in this exercise whose code I know is properly working…

I have this seem problem… Any idea what is the reason?

try this. i have commented what changed

``````rades = [100, 100, 90, 40, 80, 100, 85, 70, 90, 65, 90, 85, 50.5]

total = 0

return average

variance = 0
for score in grades:
variance += ((average - score) ** 2)/len(grades)
# variance /= float(len(grades)) took this line out added it above
return variance

return variance**0.5

``````
1 Like

hi

pleas help i have the same problem, here my code:

notas = [100, 100, 90, 40, 80, 100, 85, 70, 90, 65, 90, 85, 50.5]

def print_calificaciones(calificaciones):
for calificacion in calificaciones:
print calificacion

def notas_sum(calificaciones):
total = 0
for calificacion in calificaciones:
total += calificacion

def promedio_notas(calificaciones):
suma = notas_sum(calificaciones)
promedio = suma / float(len(calificaciones))
return promedio

def varianza_notas(calificaciones):
promedio = promedio_notas(calificaciones)
varianza = 0
for calificacion in calificaciones:
varianza = varianza + ((promedio - calificacion) ** 2)
varianza /= float(len(calificaciones))
return varianza

def calificaciones_std_desviacion(varianza):
varianza = varianza ** 0.5
return varianza

varianza = varianza_notas(notas)

print print_calificaciones(notas)
print notas_sum(notas)
print promedio_notas(notas)
print varianza
print calificaciones_std_desviacion(varianza)

Do you want a Clean and Neat Code? Try Mine Hope It Helps. grades = [100, 100, 90, 40, 80, 100, 85, 70, 90, 65, 90, 85, 50.5]

total = 0

return average

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

result = variance ** 0.5
return result

Tuve problemas similares, me acepto el siguiente codigo, suerte:v

notas = [100, 100, 90, 40, 80, 100, 85, 70, 90, 65, 90, 85, 50.5]

def print_calificaciones(calificaciones):
for calificacion in calificaciones:
print calificacion

def notas_sum(calificaciones):
total = 0
for calificacion in calificaciones:
total += calificacion

def promedio_notas(calificaciones):
suma = notas_sum(calificaciones)
promedio = suma / float(len(calificaciones))
return promedio

def varianza_notas(calificaciones):
promedio = promedio_notas(calificaciones)
varianza = 0
for notas in calificaciones:
varianza += (promedio - notas) ** 2
result = varianza / len(calificaciones)
return result

def calificaciones_std_desviacion(varianza):
result = varianza ** 0.5
return result

varianza = varianza_notas(calificaciones)

print notas
print notas_sum(calificaciones)
print promedio_notas(calificaciones)
print varianza_notas(calificaciones)
print calificaciones_std_desviacion(varianza)

``````print print_grades(grades)