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 trialAzamat Murzabayev
2,542 PointsWhat 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.
def hello_student(name):
hello = 'Hello ' + name
hello_student('')
2 Answers
Steven Parker
231,248 PointsFor 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.
Ritik Parihar
2,169 Pointson the third line you should add a return statement returning u'r 'hello' variable
//syntax
def hello_student(name): hello = 'Hello' + name return hello
Abdi Salad
8,078 PointsAbdi Salad
8,078 Pointsdef hello_student(name): hello = 'Hello ' + name return hello
hello_student('Azamat')
I believe this code snippet should work for ya.