Can anyone help me with 7.7?


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)


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


Thank you! This was very helpful!


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