Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialHello Brown
531 PointsNameError: name 'loopy' is not defined why? function got name
def loopy(items):
# Code goes here
i = 0
while i < items.length:
if items[i] == "a":
continue
else:
print(items[i])
i = i + 1
2 Answers
Ken Alger
Treehouse TeacherHello;
Welcome to Treehouse!
For this challenge you can get through it using a for
loop.
def loopy(items):
# Code goes here
for item in items:
if item[0] == 'a':
continue
else:
print(item)
Post back if you have additional questions.
Happy coding,
Ken
Hello Brown
531 PointsHi, thanks for answer. I did not understand the task
Luke Glazebrook
13,564 PointsHi!
I'm not 100% sure that this will fix your issue but you are not closing your loopy function at all. This might be causing the error that you are experiencing.
-Luke
Hello Brown
531 PointsHi,
next time i closed the function but it did not do nothin. Thanks for answer :) i am already have the decision.
Ken Alger
Treehouse TeacherKen Alger
Treehouse TeacherEdited for markdown