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 trialMishaal Naqvi
Courses Plus Student 1,645 PointsI don't know where I'm going wrong.
It says that the function is not outputting "Hello Ashley" correctly, I am not really sure how to go about this.
def hello_student(name):
greeting = print('Hello', name)
return greeting
hello_student("Ashley")
2 Answers
Steven Parker
231,269 PointsThe function should create a combined string using concatenation, and return that string.
You won't need to "print" anything.
And just for general info, "print" doesn't return anything useful for an assignment.
Hudson Lanier
6,329 PointsHey Mishaal,
I think the problem is with the comma between 'Hello' and name. Try a plus sign instead of a comma.
This will work too: greeting = "Hello {}".format(name) Also: greeting = "Hello" + name