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 trialvictor E
19,146 Pointsthis one is easy but I am still having a hard time with it.
help :)
continents = ['Asia', 'South America', 'North America', 'Africa', 'Europe', 'Antarctica', 'Australia']
for continent in continents:
if continents.(0)= a:
print("* " + continent)
else:
continue
1 Answer
Nick Budak
Courses Plus Student 12,149 PointsHi Victor,
You don't need an if
condition, since you're just printing all the continents regardless of their name. Try getting rid of your if
and else
lines and just using the print
statement and you should be good.
Moderator Edit: Moved response from Comment Section to Answer section as it provides an answer.
Jason Anders
Treehouse Moderator 145,860 PointsHi Nick Budak,
I've been moving your "comments" to the Answer section as you are providing answers and not comments. Please, in the future place your response within the Answer section of the Thread. This will keep the Community organized and allow other students searching the Community for answers to see that a particular post has, in fact, been answered.
It also allows other students who are looking to help to not end up reading through an entire post only to see that an answer was provided, but in the Comments section which doesn't show as answered in the main Community.
Thank you for you participation in the Community and for your cooperation.
Jason ~Treehouse Community Moderator
Lex Dunko
Data Analysis Techdegree Student 4,449 PointsHi Nick,
I'm not sure this answers his questions. The challenge is to "only print continents that begin with the letter "A". HINT: Remember that you can access characters in a string by index"
I'm stuck on the same problem.
Alan Kuo
7,697 PointsAlan Kuo
7,697 PointsThe quiz asks you to use an if loop