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 trial

Python Python Basics (2015) Shopping List App Break

Chinmay Tare
Chinmay Tare
467 Points

Unable to complete this exercise. Please help :(

Can anybody please tell me where I am doing it wrong?

breaks.py
def loopy(items):
    # Code goes here
    for current_item in items:
      print(current_item)
    if current_item == "STOP":
      break

3 Answers

Hi there,

You want to break out if the item is "STOP" before you print the item. So just amend your order a little and you're fine.

Let me know how you get on.

Steve.

Chinmay Tare
Chinmay Tare
467 Points

Thanks a lot Steve! It worked:D Such a stupid mistake it was! :p

Steve Hunter do you as a moderator have feedback channel you can use to have this question looked at? I know I answer it/ see it almost daily.

This has got to be a source that contributes to mod burn out and student frustration. Some would say a simple search would turn up hundreds of answers to this exact question and if students would just do that it would save the sanity of the people of the community/moderators that answer this exact question on an almost daily basis, and while that is true, I also see the side of the frustrated student who has been pounding code in this exercise for 30-45 min and just keep getting "bummer......" The last thing that student wants to do is mess with searching....I don't agree per se, but I get it.

I can't figure out if it's because it's not covered clearly or the parser is just to strict or what but something needs to be tweaked on this for sure :)

Sorry Chimney Tare for highjacking your thread :D

Hi Shawn,

Yes, we can feedback to the TH guys. There are questions that arise in the forums quite frequently, yes. What you don't see is the number of people who didn't ask. That's the context that is lacking here.

Some courses are extremely popular (I don't have the stats for Python) and some are predominantly frequented by beginners so, some 'friction' on these challenges is to be expected, indeed, encouraged - it helps with learning, to some extent, perhaps? But, yes, if we see a 'failure' (for want of a better word) rate exceeding a nominal percentage, then maybe the question posed needs looking into, or the error message generated made more explicit/helpful. I've not done this course so am unaware of the coverage of the loop concept and different people pick up things in different ways, so my opinion is wholly irrelevant!

I think the main reason this challenge causes confusion is the order the lines need to appear in. Most students get the code correct, like Chinmay did, but get the order a little amiss. I guess that could be down to the question's wording, and that's easy to tweak for sure.

I'll keep an eye out for this question arising - currently it is asked a couple of times a day. I'll see if I can get some context for that, i.e. how many times per day/week this challenge is taken.

Steve.

Chinmay Tare
Chinmay Tare
467 Points

Haha... No problem Shawn! What I find confusing is even if I get the exercise done correctly, sometimes the 'bummer' pops up and shows some weird error. I think TH guys should do something about it as it can be frustrating and demotivating as well.

Thanks Steve :)