Can anyone help me with 7.7?


#1




Maybe I am missing something, but my code keeps coming up with an error.


It should return "Hello world!" but keeps saying that it SHOULD say "Waynesworld". Whenever I change the code to return "Waynesworld" it says that my code should return "Helloworld" Can anyone help me understand what I am doing wrong? Or is this a glitch?


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


print string_function(n)


#2

this line:

return n + 'world'

you use n, but you should use s the function parameter, this way, your function work for different strings you pas as argument on function call


#3

Thank you! This was very helpful!


#4

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