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 triallizeth jurado
1,379 Pointsloopy python
I have an error "all hello's can not be found" , Why? , Could somebody help me?
hellos = [
"Hello",
"Tungjatjeta",
"Grüßgott",
"Вiтаю",
"dobrý den",
"hyvää päivää",
"你好",
"早上好"
]
for word in hellos:
print(word + "World")
2 Answers
Vidhya Sagar
1,568 PointsYou just have to put a space inside the quotes of world .Sometimes these challenges are quite taxing and strict .Hope this helps.Happy Coding.
for word in hellos:
print(word + " World")
andren
28,558 PointsThe loop itself is fine, the issue is with the spacing in your print statement. If you ran the code you have written the result would be:
HelloWorld
TungjatjetaWorld
GrüßgottWorld
etc...
As you can see it is not spaced properly, that is because of the fact that when you concationate two string together they are merged together without any spacing being added, so if you want proper spacing you have to it on on your own manually. The easiest way of doing this is to add a space at the start of the "world" string like this:
for word in hellos:
print(word + " World")
Changing your loop to look like that will allow you to complete the challenge.
lizeth jurado
1,379 Pointslizeth jurado
1,379 Pointsthank you :) It work well