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

What do I put in the 3rd line?

It told me to call the hello_student function, and make the return value to be a variable that's called hello. I tried calling the function, but I don't know what to put inside the circular brackets.

creating_functions.py
def hello_student(name):
   hello = 'Hello ' + name
hello_student('')
Abdi Salad
Abdi Salad
8,078 Points

def hello_student(name): hello = 'Hello ' + name return hello

hello_student('Azamat')

I believe this code snippet should work for ya.

2 Answers

Steven Parker
Steven Parker
230,970 Points

For task 1, the function needs to return the string instead of creating a variable with it.

Then for task 2, the assignment of "hello" should be done outside of the function, and by calling the function.

on the third line you should add a return statement returning u'r 'hello' variable

//syntax 

def hello_student(name): hello = 'Hello' + name return hello