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

I am sorry but I don't no why my code is not correct......

def hello_student(name):
    val = hello name
    return val
print(hello_student(yahnis))

3 Answers

Remember that you have to surround strings with quotes.

What is the correct code in this example? I tried

def hello_student(name): val = β€œHello” + name return val

And I just kept getting errors.

  1. Put a space after the Hello.
  2. Make sure to surround yahnis with quotes too.

Thanks a lot I will be carefuly with the format.