15- Recorrer una lista en una funcion (BUG)


#1

Hi,
I think there is a bug in this exercise. I was reviewing the code and it works fine, but a window of codeacademy says me that it's wrong

The code:

> n = [3, 5, 7]
> def total(numeros):
>     resultado = 0
>     for x in n:
>         resultado = resultado + x
>     return resultado
> print total(n)

The printed result is 15.

The window of Codecademy:
¡Uy! Probá otra vez.
    total([0, 3, 6]) returned 15 instead of 9

Basicly, the web is considering a list n= [0,3,6] instead of n=[3,5,7].
I've tried to change the list to n= [0,3,6], but the message is:
¡Uy! Probá otra vez.
total([0, 4, 1, 5]) returned 9 instead of 10

and over and over again...


#2

should be

for x in numeros

#3

you're right!
The code works fine. Because the printed result were the same, I was thinking that the code was ok.

Thanks!!