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

The order of val, return and print make no sense at the moment

The order of val, return and print make no sense at the moment, how to fix it

2 Answers

Steven Parker
Steven Parker
231,248 Points

The challenge instructions don't ask for anything to be named "val". Also, you won't need "print" for this challenge.

If you need more specific help, please show your code.

Steven Parker
Steven Parker
231,248 Points

I'm having to guess about the lines and indentation, but the obvious issues are:

  • variable names should never be enclosed in quotes
  • you don't need to create "val" at all
  • you don't need to "print" anything
  • you need to combine the string "Hello " with the name before returning it
  • for task 1 you only need to define the function, not call it

def hello_student ("name") : print("name") val = name return("name") hello_student(name) sorry to waste your time with this I learn by talking notes usually but not this time