Welcome to the Treehouse Community
The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.
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
def hello_student(name): val = 'Hello ', name
Megan AmendolaTreehouse 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
.format() or an
f"". This video goes through those options.
Finally, you need to return the complete string using the