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 trialUsman Badar
9,304 PointsWrite a function called hello_student. This function should receive one argument, name. This function should return one
How I can fix my code:
def hello_student (name):
return 'Hello' + name
hello_student ('Usman')
9 Answers
Daniel Phutinyane
3,077 PointsHi Tatenda, not sure if you managed, but you have to write 'Hello ' not 'Hello'. notice the space between the last "o" and '
jon nikolakakis
1,639 PointsThis will pass
def hello_student(name):
return 'Hello ' + name
Baitsheletse Thokwana
4,136 Pointsdef hello_student(name): return 'Hello ' + name
print(hello_student("Thokwana"))
Tatenda Mushaninga
2,479 Pointsi did this but its not working
def hello_student(name): return 'Hello' + name
print(hello_student ('Tatenda'))
it keeps saying double check spelling but everythings okay
GAOTLHOBOGWE GAOTLHOBOGWE
1,164 PointsGreat
KRIS NIKOLAISEN
54,971 PointsFor task 1 there should be a space after 'Hello '
Baitsheletse Thokwana
4,136 Pointscheck your indentation and try using double quotes when calling your function
MALEPA SEITSANG
3,849 Pointsdef hello_student(name): return 'Hello ' + name
print(hello_student("MalepaS"))
Jonathon Tucker
1,526 Pointsdef hello_student(name): return('Hello {}'.format(name))
print(hello_student)
worked for me :)
Aaron Brown
3,676 PointsThis worked for me :)
def hello_student(name): val = "Hello " + name return val
print(hello_student("Aaron"))
BONOLO MOLEFI
3,439 PointsHi Tatenda!This is how i got the question correct.
def hello_student(name): return 'Hello ' + name
print(hello_student("Bonolo"))
make sure u indent spaces after the colon