Python Functions, Packing, and Unpacking Getting Info In and Out of Functions Functions with Arguments and Returns

Spencer Lebel
Spencer Lebel
1,607 Points

hello_student return not working

Please help point out what my code is missing here

creating_functions.py
def hello_student(name):
    hello = "Hello"  + name
    return hello

hello = hello_student("spencer")

1 Answer

Brandon White
seal-mask
MOD
.a{fill-rule:evenodd;}techdegree seal-36
Brandon White
Treehouse Moderator

Hi Spencer Lebel,

Right now your return string would look something like this: "Hellospencer". It's because you don't have a space between the "o" in hello and the end quotation.

It's easy to skip over in the challenge instructions, but the "Hello" written in the instructions is actually "Hello " with that added space. Add that space, and your strings will return like this: "Hello spencer", and you'll pass the challenge.