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.

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

Jorge Grajeda
Jorge Grajeda
1,240 Points

May somebody please elaborate on this question?

I've tried many things to solve this problem but I keep coming back to an error

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

2 Answers

Christian Beckett
Christian Beckett
11,121 Points

have you tried doing this?

def hello_student(name):
    return("Hello " + name)
Rick Gleitz
Rick Gleitz
42,802 Points

In Christian's return string (which is the way to go) the only adjustment needs to be a space after the o in Hello, like this: "Hello "