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 Introducing Lists Using Lists Continental

Mischa Potter
Mischa Potter
2,555 Points

I broke the code...

For somereason, this code dosen't work. It worked once, then I realoaded the page and now it doesn't work. How do you fix this?

continents.py
continents = [
    'Asia',
    'South America',
    'North America',
    'Africa',
    'Europe',
    'Antarctica',
    'Australia',
]
for continent in continents
    print("*" + continents)

3 Answers

boi
boi
14,241 Points

You have 3 errors in your code. Try to fix it, otherwise, post back here for help.

Mischa Potter
Mischa Potter
2,555 Points

dear boi, no, you did not make me offended in any way, thanks for your help. When you sent me the code, it was at 3 A.M in the morning. I was sleeping! Thats why I didn't respond. And thanks for the feedback

Mischa Potter
Mischa Potter
2,555 Points

Hm, I dont know whats wrong cause Im not good at coding lol

boi
boi
14,241 Points

Would you believe if a beginner said he/she is a pro? You have errors in a basic for loop, you don't need to be "good" at coding to solve them, you need to watch one video of 2 mins to solve the error. Solution 👇

continents = [
    'Asia',
    'South America',
    'North America',
    'Africa',
    'Europe',
    'Antarctica',
    'Australia',
]
for continent in continents:  👈#Added missing colon
    print("* " + continent)  👈#Added a space in string and removed "s" from continents.

I highly recommend you rewatch the previous videos before moving further into the course, if you have no strong fundamentals, you will give up on your coding journey. am concerned for you potter

boi
boi
14,241 Points

Judging by no response from you and, no activity, I assume I might have made you upset or offended, I apologize sincerely for my response.

I feel like you might have taken my comment the wrong way, my response was not indented to make you feel inferior in any way or was not in a tone of sarcasm nor hatred, in fact, it was a friendly "blunt" tone. My communicating skills are somewhat childish. I hope you continue on your coding journey and not be discouraged by people like me.

pssst, if you send me a reply, It would make me happy