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

challenge creating functions part 2

I'm stuck on this challenge

creating_functions.py
def hello_student(name):
    one_value = 'Hello ' + name
    return one_value
    hello_student()
    hello = return one_value

2 Answers

Chris Freeman
MOD
Chris Freeman
Treehouse Moderator 68,423 Points

Hey Ty Wilson, let’s break down Task 2.

  • Call the hello_student() function...

Calling the function is done from outside the function definition (not indented) and must include the correct number of parameters.

hello_student("Ty")
  • save the return value to a variable called hello.

the result ls of a function call are return, allowing the function call to be on the right-sign of an assignment:

hello = hello_student("Ty")

Post back if you need more help. Good luck!!!

Thanks a lot Chris Freeman!

wooster50
seal-mask
.a{fill-rule:evenodd;}techdegree
wooster50
Front End Web Development Techdegree Student 2,367 Points

So far I have felt confident in the material but when I get to these challenges I struggle heavily. Is this normal? I just go blank.

Yeah, i feel like i know the code pretty well, but the challenges can confuse me. I'd say it's normal.