Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialsippi suoif
Courses Plus Student 1,155 PointsI 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
def hello_student(name):
val = 'Hello ', name
1 Answer
Megan Amendola
Treehouse TeacherHi 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.