Code doesn't work


The code gives an error like "The body of the function should not contain any references to 'n'"

Replace this line with your code. 
Can't solve 12th challenge

n = [3, 5, 7]

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

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



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

You need to delete this part of the code.

Its written in instruction..

Inside that function, print out each element one by one. Use the existing code as a scaffold.

It means you have to use same structure(as for loop example) for your program but have to remove it.


Oh.... This is weird.

I tried this thing by commenting out those two lines of codes. However, it doesn't work if you comment them out. It works only if you delete them.

I tried to comment them out but didn't work earlier, but this time deleted and it works.



Yeah, The reason as I mentioned was in the instructions.


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.