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

I dont understand how to solve the "Hello Ashley" problem in one of the challenges

I have written and tried so many different things, and it doesn't seem to be working. help

creating_functions.py
def hello_student(name):
    val = 'Hello ', name

1 Answer

Megan Amendola
seal-mask
STAFF
.a{fill-rule:evenodd;}techdegree seal-36
Megan Amendola
Treehouse Teacher

Hi sippi suoif ! You've got your function created correctly, great job! The issue is with what's inside the function. The challenge is asking you to add the name parameter to the string 'Hello ' and return it. Right now you've created a variable called val and it's holding a tuple not a string because of the comma ,. It looks like this: ('Hello ', 'Ashley')

Instead, you want to put the two strings together. How do you put two strings together? You can use + or .format() or an f"". This video goes through those options.

Finally, you need to return the complete string using the return keyword.