Should I just wait until they replace this course to finish it?


#1


https://www.codecademy.com/courses/python-beginner-nzzVa/3/5?curriculum_id=4f89dab3d788890003000096

join_strings(['x', 'y', 'z', 'a']) returned 'azyx' instead of 'xyza'

I don't know whether I'm making the mistakes or the program is.


n = ["Michael", "Lieberman"]
# Add your function here
def join_strings(words):
    result =""
    for item in words:
        result = item + result
    return result
print join_strings(n)


#2

no because you got something wrong in your code.


#3

Your code looks good except it doesn't satisfy what the lesson wants...

In your for loop try swapping item and result...

for item in words:
    result = result + item
return result

#5

result = item + result

in math a + b = b + a but when we spell a word, "no" does not = "on".

Think about the order of the words in that line of code.


#6

Thank you for your help. That worked.


#7

Thank you for your help. That worked.


#8

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.