Strings in functions


#1

I dont know what I have done wrong. Please help

Here is the error message
File "python", line 4
SyntaxError: 'return' outside function

Here is my code
n = "Hello"
# Your function here!
string_function(s)
return string_function("world")


print string_function(n)

#3

you need define function called "string_function"
function is defined by
def my_function():

check again chapter about function :wink:


#4

hey,this my code.
n = "Hello"

Your function here!

def string_function(s):
return s + 'world!' #you just need to return the argument,not the function.

print string_function(n)


#5

Thank You. I finally made it work