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 trialMit Katwala
Courses Plus Student 826 PointsHellos in Different Languages prints random characters
So I have to print hellos of different languages from a list but I guess certain languages are not supported by my browser and print randow characters instead of the hello in a particular language. Because of this I get an error "Bummer! Didn't find all the hellos"
What should I do?
hellos = [
"Hello",
"Tungjatjeta",
"Grüßgott",
"Вiтаю",
"dobrý den",
"hyvää päivää",
"你好",
"早上好"
]
for each in hellos:
print ("Hello " + each)
3 Answers
Jason Anders
Treehouse Moderator 145,860 PointsHey Mit,
It's actually not a problem with the your browers, I don't think. It's because you have what the instructions are asking you to print kind of backwards. The string should be "<Hello in the language> World" but you are printing "Hello <Hello in language>.
So, you need to change your print statement to be:
for each in hellos:
print(each + " World")
Keep Coding! :)
Justin Radcliffe
18,987 PointsHi Mit,
You may have to convert the letters giving you problems into html special characters:
ß = ß <!-- <---- for example -->
Here's a good link to a reference:
Mit Katwala
Courses Plus Student 826 PointsDidn't solve my problem but learnt something new! Thanks :)
Mit Katwala
Courses Plus Student 826 PointsOh God! That was silly.. Thank you Jason :)