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 trialIngrid Matthews
1,465 PointsCompletely stuck on this one
Can someone help me see what's wrong with this answer? Many thanks!
for continent in continents: if continent[0].lower() == "a": print(continent)
continents = [
'Asia',
'South America',
'North America',
'Africa',
'Europe',
'Antarctica',
'Australia',
]
# Your code here
for continent in continents:
if continent[0].lower() == "a":
print(continent)
1 Answer
Steven Parker
231,269 PointsYou just forgot to prefix the name with a "bullet" (asterisk). Fix that and it will pass.
It's a bit fancier than needed though, since the instructions only ask you to test for "A" (capital). So you can test for it directly and don't need the case conversion.
Francesco Vertemati
8,223 PointsFrancesco Vertemati
8,223 PointsHi Ingrid! The test is asking for the first letter to be "A" so you can just write
if continent[0] == "A" :
also the test require the output to be formatted with asterisk and space before the name of the continent exactly like the previous one, so the last line should include "* " before the string continent
Best