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 trialibrahim eliamani
1,302 Pointswhen i run the code ... i get bummer message but when I preview its correct
''' def hello_student(name): return name
print("Hello {}".format(hello_student('Ashley Judd')))
def hello_student(name):
return name
print("Hello {}".format(hello_student('Ashley Judd')))
2 Answers
Megan Amendola
Treehouse TeacherHi! All of this code should be happening inside of the function. This function should return the string 'Hello ' followed by the value of the name parameter. Right now, the function is only returning the name. The "Hello {}".format(
should be inside the function.
Victor Curtis Jr
5,268 PointsWell if you're trying to do challenge 1, then you just need to return "Hello"
and the name
of the student. It looks like here you are trying to print it out which you necessarily don't have to do. you could try:
def hello_student(name):
return ("Hello {}".format(name))