Modifying each element in a list in a function error


#1




i get this error:

Traceback (most recent call last):
File "python", line 8, in
File "python", line 4, in double_list
NameError: global name 'x' is not defined


n = [3, 5, 7]

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


#2

variables names are case sensitive, your function parameter is uppercase, make it lowercase (naming convention)


#3

■■■■, its the tiny details that keep getting me. thanks


#4