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 trialRicardo Franco
Data Analysis Techdegree Student 16,258 PointsSomeone check my code please
I am stumped as to why the 2nd task of my code is not successfully passing. When I refresh the right half of the screen, my output displays the output correctly according to instructions and only displays the continents that start with an "A". However, I am getting an Assertion Error that is inhibiting me from progressing. Thank you, in advance, for your time and assistance.
continents = [
'Asia',
'South America',
'North America',
'Africa',
'Europe',
'Antarctica',
'Australia',
]
# Your code here
for continent in continents:
print("* " + continent)
for continent in continents:
if continent[0] == "A":
print(continent)
Ricardo Franco
Data Analysis Techdegree Student 16,258 PointsThank you, Francesco...I really appreciate your time and help. I knew I was close. I just misunderstood the instructions, I suppose.
1 Answer
Steven Parker
231,198 PointsYou should have only one loop throughout the challenge. For task 2, you just modify it to be selective.
Ricardo Franco
Data Analysis Techdegree Student 16,258 PointsI figured it out...thank you Steven
Francesco Vertemati
8,223 PointsFrancesco Vertemati
8,223 PointsHi Riccardo,
I think you still have to include the bullet with space "* " before the continent name.