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 trialPaul Je
4,435 PointsUpdated version
Not sure what the correct syntax is to correct this issue? Thank you in advance!!
hellos = [
"Hello",
"Tungjatjeta",
"Grüßgott",
"Вiтаю",
"dobrý den",
"hyvää päivää",
"你好",
"早上好"
]
for hello in hellos:
print((hello) + "World")
2 Answers
Vittorio Somaschini
33,371 PointsHi Paul.
There is an indentation problem in the last line of the code (the challenger should warn you about this).
Also, there is another small mistake: in the print statement you are missing a space: with the code you have written the 2 words will be printed together, for example hello + world will result in helloworld instead of hello world!
;)
Vittorio
Robert Esteves
1,301 PointsHi Paul,
I agree with Vittorio.
The error is in the "for" loop. Remember that after the colon (:) you need to indent your code. Also, the print statement needs a space between Hello and "World".
Finally, you don't the parentheses around the "hello" variable in the print statement.
Hope that helps.