Please can someone help with String in Functions!


#1

I have typed in this.....

n = "Hello"

Your function here!

def string_function(s):
s="world"
return (n)+(s)

print string_function(n)

....and it has come up with....

Oops, try again. string_function('Waynes') returned 'Helloworld' instead of 'Waynesworld'

...Please can someone tell me why this won't work


#2

Hi
I don't think you need to define s = "world" in function string_function. In return just add s to string. However if you really want to, then use another letter, cause "s" is already a function argument. After that, in return add s to this new letter without parentheses.