7. Strings and Fuctions



string_function('Waynes') returned 'Helloworld' instead of 'Waynesworld'

To pass

n = "Hello"
# Your function here!
def string_function(s):
    s = "Hello" + "world"
    return s

print string_function(n)


Your code inside the defined method is incorrect. You want to take n and connect it to "world". To do that, you would not want to redefine s inside of the function, simply add to to it in the return statement.


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