def total(numbers): result=0 for i in range(len(numbers)): result += numbers(i) return result print total(n)

It didnt make any change if I wrote result = result + numbers(i) error message: Traceback (most recent call last): File "python", line 8, in File "python", line 6, in total TypeError: 'list' object is not callable This message doesnt help me a *****

Thanks for your help. Yes you are correct. I already have found a solution and moved futher. As I remember, my final version was a little bit different but sometimes many different solutions work fine.

Silvester 22.08.2016 11:21 kirjutas kuupäeval "Alison Williams" < codecademy@discoursemail.com>:

Sjurjo - you have round brackets on your numbers[i] instead of square brackets. Otherwise everything looks fine. See mine below:

n = [3, 5, 7]

def total(numbers): result = 0 for i in range(len(numbers)): result = numbers[i] + result return result print total(n)

Visit Topic

or reply to this email to respond. In Reply To sjurjo https://discuss.codecademy.com/users/sjurjo August 19 n = [3, 5, 7] def total(numbers): result=0 for i in range(len(numbers)): result += numbers(i) return result print total(n) It didnt make any change if I wrote result = result + numbers(i) error message: Traceback (most recent call last): File "python", line 8, in …