Return 'Helloworld' - solved


#1

**Edit - switching the 'n' to 's' solved the problem.

I received an error: Oops, try again. string_function('Waynes') returned 'Helloworld' instead of 'Waynesworld' with either this code:

n = 'Hello'
def string_function(s):
return n + 'world'
print string_function(n)

or this code:

n = 'Hello'
def string_function(s):
return '%sworld' %n
print string_function(n)

Does anyone know what result they're looking for instead?


#2

It seems to expect a space before 'world'.

return "%s world" % s

Note the variable s, not n inside the function.