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

Lalit Aditya
Lalit Aditya
400 Points

I need you to help me finish my loopy function. Inside of the function,I need a for loop that prints each thing in items

Can you please provide the code fragment?

breaks.py
def loopy(items):
    # Code goes here

3 Answers

Antonio De Rose
Antonio De Rose
20,884 Points

please make a start, go through the videos over and over, until you are able to take a start, unless you take, would not be able to guide you.

Hey Lalit! Yea, do what Antonio said, its okay to be confused about the challenge, having trouble with steps or syntax. But if you feel like you have no idea what the challenge is asking of you, in this case you dont know what a for loop is, always rewatch the videos. Its a good practice to follow right from the start. although i totally get you, ive watched 16 minutes videos on a subject and felt like i understood it really well, but as soon as i had to do a code challenge i couldent remember anything.

Stick with it tho! It will get better!

Note: if you do rewatch the video and your still having trouble, write back to this thread with your code and we will be sure to help!

I don't know if this will help, but I do agree that you need to go back and watch the videos again.

def loopy(items):
     # Code goes here

This is the start of a funciton. In the function you are going to get passed a list of items. What you have to do is take that list of items and put them into a for loop. The videos talk about it pretty well, but here is an extra link to the Python 3 documentation as well.

Like the others have said, if you put some code in there and still can't figure it out then we are more then happy to help.