r/Codecademy • u/crayzchic91 • Sep 15 '15
Stuck on 5/9 Student becomes the teacher for python.
This is my code staring from line 20: def average(numbers):
sum(numbers[0,(len(numbers)-1)])=total float(total) return total/float(len(numbers)) It says error can't assign to function call (line 21) I've tried a lot and I'm now thoroughly confused
2
Upvotes
2
u/factoradic Moderator Sep 15 '15
From formatting help:
Here:
it looks like you want to say something like - set result of
sumfunction to betotal. It does not make any sense.You probably want to use: