13/18


#1

So why is this not correct???
I've seen some other posts, but no reasons why it doesn't pass

n = [3, 5, 7]

def double_list(x):
    for i in range(0, len(x)):
        n[i] = n[i] * 2
    return x
print double_list(n)

Oops, try again. double_list([0, 1]) returned [0, 1] instead of [0, 2]


#2

never mind i see the problem


#3

Hi @methodninja09400 ,

I'm glad you found the problem. Since a mistake becomes an educational experience when you correct it, it is worth mentioning, for the benefit of others who might read this, that you may have corrected the problem by changing this ...

n[i] = n[i] * 2

... to this ...

x[i] = x[i] * 2

This way, the statement works with the parameter, x, through which any list of numbers can be passed to the function, rather than always working with the particular list, n.