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 trial

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

Name error?

I've defined the function to accept one argument, and told it to print a string, followed by the argument passed. When I run it, I get a name error on the argument, saying it's not defined.

def hello_student(name): 
    print('hello,', name) 


1 Answer

Okay, so this challenge is SUPER finicky, even after I figured out that I had to pass the argument as a string. Make sure you're concatenating (+) instead of using commas, and returning instead of printing, and that your 'Hello ' string is EXACTLY what's given in the question.