Oops, try again. The body of your function should not contain any references to 'n'


#1

I got an error: Oops, try again. The body of your function should not contain any references to 'n'

n = [3, 5, 7]

for i in range(0, len(n)):
print n[i]

def print_list(x):
for j in range(0, len(x)):
print x[j]

print_list(n)


#2

Had the same thing a minute ago, seems like the code checker looks at the actual code you submit, you have to remove (commenting out doesn't help) the pre-written code.

n = [3, 5, 7]

def print_list(x):
for j in range(0, len(x)):
print x[j]

print_list(n)


#3

They should have written this in the task. However, maybe authors make us develop our tester skills^) Thank them.


#4

Thans for your help.


#5

Don't work this code shown same error again
my code....
'''n = [3, 5, 7]
def print_list(x):
for i in range(0, len(n)):
print n[i]

print_list(n)'''

your code....

n = [3, 5, 7]

def print_list(x):
for j in range(0, len(x)):
print x[j]

print_list(n)


#6

Removing the provided for loop worked. Commenting it out didn't work. Thanks!