Strings in functions


#1



Problem:

Have used various methods, but still cant find correct solution. Can someone tell directly what i am missing out

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


Replace this line with your code.


#2

n = "Hello"
# function with parameter s
def string_function(s):
     print s

# function calls with different arguments
print string_function(n)
print string_function("Waynes")

please read the comments in the code above, i am going to use those terms in my explanation.

so, when we call the function we supply an argument (n or "Waynes" for example), the argument gets passed into the function parameter s

the great thing about functions is that we can use them to a repetitive task.

so you should use s (the function parameter) to concatenate "world" an the argument supplied at function call.


#3

thx! now i get it, i didnt thought it was that easy


#4