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 trialNico Romero
1,365 PointsFor loop with items list
I feel like there is something im missing, the question asked for a for loop, I provided the for by assigning it to item, I tried to creak a logic to stop if "Done" and I gave it an else loop as well. Is there something im missing? Thank you!
def loopy(items):
# Code goes here
for item in items:
if item == "Done"
break
else:
print(item)
1 Answer
james south
Front End Web Development Techdegree Graduate 33,271 Pointsyou are missing the colon at the end of your if statement, and also it says the loop should break on the word STOP, not Done. change done to stop and add the colon and it will pass.
Nico Romero
1,365 PointsNico Romero
1,365 PointsSo I changed Done to STOP, but I am unsure what you mean by adding a colon at the end of my statement, I don't see anywhere a colon can be added :/
Nico Romero
1,365 PointsNico Romero
1,365 Pointsi figured it out! i need to add s at the end of items in my if statement. Thank you for your help james!!