<In what way does your code behave incorrectly? Include ALL error messages.>
It says
Oops, try again.
It looks like your grades_sum function doesn’t properly compute the
sum of all the grades! It returned 78 instead of 320 for grades_sum([34,
9, 28, 62, 74, 11, 5, 97])
Tried it but it gets this:
Oops, try again.
It looks like your grades_sum function doesn’t properly compute the
sum of all the grades! It returned 1045.5 instead of 278 for
grades_sum([40, 45, 10, 61, 23, 99])
…Wha…?
So like this?
for i in grades_sum(grades):
I get
Oops, try again.
Your grades_sum function threw the following error: maximum
recursion depth exceeded for grades_sum([55, 1, 79, 41, 34, 47, 24])
grades = [100, 100, 90, 40, 80, 100, 85, 70, 90, 65, 90, 85, 50.5]
def grades_sum(grades):
total = 0
for i in grades:
total = total + i
return total
print grades_sum()
Doesn’t work.
File “python”, line 7
return total
^
IndentationError: unindent does not match any outer indentation level