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.
Haasini Beeravolu616 Points
I don't understand this. What am I missing in this code?
I am not sure what I need to add. I have been trying for a while.
def hello_student(Hello): return hello_student
Jassim Al-Hatem20,639 Points
You need to return the string 'Hello' followed by the parameter. What you're doing is returning the function's name...., here's an example:
def example(eg): return 'Hello ' + eg
Megan AmendolaTreehouse Teacher
Hi! Let me walk through the challenge:
- Write a function called
hello_student. - You did this correctly, nice work!
- This function should receive one argument,
name. - Your function is receiving one argument right now called
- This function should return one value, the string 'Hello ' followed by the value of the
nameparameter. - Your function is returning itself because you are returning
hello_studentwhich is the name of the function. Instead, you should be returning a string with both the word 'Hello ' and the name parameter with a space between the two. Here's a video to remember string formatting.
Let me know if you still need help :)