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 trialchannonhall
12,247 PointsWhats going on! **help meee**
Please help I dont understand what i'm doing wrong I thought i was doing it right but it seems like the code challenge said BUMMER! help me ;-;
def loopy(items):
for loopy in items:
print(items)
if loopy == 'STOP':
break
2 Answers
Vidhya Sagar
1,568 PointsSorry ,it was your code which i altered. NOW i entered my code and checked and its working fine.
def loopy(items):
for item in items:
if item.lower()=="stop":
break
print(item)
Vidhya Sagar
1,568 PointsIt is a top down approach.So in your code it'll print the item irrespective of the condition ,since it is below print. Try this.
def loopy(items):
for item in items:
if item.lower()=="stop":
break
print(item)
channonhall
12,247 PointsThanks Vidhya, But it seems that your code doesn't work on the first task nor the second task
channonhall
12,247 Pointschannonhall
12,247 PointsThanks Vidhya,
Now I can FINNALY move on Thank you so much Vidhya!
(Best Answer AND a 1+ :D)