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 trial

Python Python Basics (2015) Logic in Python Loop

Noah Harness
Noah Harness
1,383 Points

"Oh no!" Comm problem

I have been trying to submit my answer to this challenge but it won't submit the answer. Was wondering if anyone else has or is currently experiencing this issue and how to resolve it.

loop.py
hellos = [
    "Hello",
    "Tungjatjeta",
    "Grüßgott",
    "Вiтаю",
    "dobrý den",
    "hyvää päivää",
    "你好",
    "早上好"
]
for words in hellos:
    hellos += "World"
    print(hellos)

1 Answer

Ronald Tse
Ronald Tse
5,798 Points

You're very close!

Basically there are 2 mistakes

  1. inside the for loop, you should use "words" instead of the list "hellos". For the same reason, you should print words instead of hellos.

    words += "World"
    
  2. You should add a space at the beginning of the World, otherwise you will get "HelloWorld" instead of "Hello World".