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 trialFrank Escamilla
776 PointsI can't seem to get past this Challenge, though the line of code I give it does appear to be correct
I'm getting an error when I check my code that indicates "Bummer! Didn't find all the "Hello"s, however when I run this it does print all the greetings:
hellos = [ ... "Hello", ... "Tungjatjeta", ... "Grüßgott", ... "Вiтаю", ... "dobrý den", ... "hyvää päivää", ... "你好", ... "早上好" ... ] for word in hellos: ... print(word + ", World!") ... Hello, World! Tungjatjeta, World! Grüßgott, World! Вiтаю, World! dobrý den, World! hyvää päivää, World! 你好, World! 早上好, World!
Any idea how I can get past this?
Thanks!
hellos = [
"Hello",
"Tungjatjeta",
"Grüßgott",
"Вiтаю",
"dobrý den",
"hyvää päivää",
"你好",
"早上好"
]
for word in hellos:
print(word + ", World!")
2 Answers
Jeremiah Bushau
24,061 Pointsnow you need a space.
for word in hellos:
print(word + " World") # add space before World no comma.
Steven Parker
231,236 PointsThe challenges can be very particular about answer format. Remember the example it gave?
So, for example, the first iteration would print "Hello World".
Note that the challenge did not ask for a comma separator.
Remove the comma and you should be good.
Frank Escamilla
776 PointsThanks! However, this is still failing:
for word in hellos: print(word + "World")
Angel Alvarez
2,491 PointsAngel Alvarez
2,491 Pointsthis worked!