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 trialCharles Russell
7,169 PointsI'm experiencing difficulty understanding why this error is showing up. It passes in the output window.
Any insights would be appreciated. The code works as expected in both my IDE and the output window of the challenge. It appears to run properly, with the exception of an assertion error: "Bummer: AssertionError: 7 != 9 : Please don't alter the continents list". I'm still fairly new to this, however I don't see any commands to alter the list. TH issue?
continents = [ 'Asia', 'South America', 'North America', 'Africa', 'Europe', 'Antarctica', 'Australia', ]
Your code here
print("Continents:") for continents in continents: print("* " + continents)
continents = [
'Asia',
'South America',
'North America',
'Africa',
'Europe',
'Antarctica',
'Australia',
]
# Your code here
print("Continents:")
for continents in continents:
print("* " + continents)
1 Answer
KRIS NIKOLAISEN
54,971 PointsYou'll want to iterate with continent singular
print("Continents:")
for continent in continents:
print("* " + continent)
Unashe Mutambashora
3,433 PointsIs it necessary to remove the "s" plural?
I am getting the same results with the "s" plural when I run the cod through Pycharm.
And also, "continent" is not defined in the program so how come this does not produce a NameError?
Charles Russell
7,169 PointsCharles Russell
7,169 Points