Control flow and looping

it seems like the code is right but i keep getting SCT error and i cant continue on next lesson.
is anyone with same issue? and any solution will be nice
thanks in advance

a = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13]
for a in a:
if a%2 == 0:
print a

difficult to tell without knowing what exercise you are at

i would guess the problem is caused by the fact that you gave the list and loop iterator the same name, give the loop iterator a different name so the list still exist after the loop

2 Likes

stetim94
thanks for the reply the exercise is under A day at the supermarket (control flow and looping)
i tried changing the loop interior name and same error (SCT) shows up in fact i get the print out put on the editor but it wont let me pass to next lesson. im Stuck.

it works now thanks again