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 Practice Creating and Using Functions in Python Practice Functions Welcome

I wasn't able to get the solution for the challenge

What does it mean by defining a single parameter can someone post their code

4 Answers

Steven Parker
Steven Parker
229,771 Points

This question is linked to a video instead of a challenge, but here's a generic example of a function defined to take a single parameter:

def add_six(val):
    return val + 6;

In this case, "val" is the single parameter.

Steven Parker
Steven Parker
229,771 Points

Those {} characters are normally called "braces" or "curly braces", and they mark the beginning and end of a function's code body in JavaScript. But I see now that your question relates to Python so I changed the example.

Does the question give the single parmeter?

What do the squiggly brackets do

Steven Parker
Steven Parker
229,771 Points

Sorry, that was a JavaScript example, I revised it and added a comment to my answer.

I was reffering to the thats odd challenge

Steven Parker
Steven Parker
229,771 Points

OK, so the structure will be similar to my example but the expression that the function returns will be different.