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 Python Basics Functions and Looping Functions

what is the thing that the function has

when creating a function it just goes like this right?

def name_of_function(unkown):

The rest of the function code

then what is the "unknown"?

2 Answers

That is where you would place 0 or more parameters. A parameter allows the function to operate on multiple input values.

Michael Stone
Michael Stone
3,087 Points

The start of every function starts by using the call β€œDEF” Example: def yell(text): In this example DEF calls the function, YELL is the name of the function, and (TEXT) is what we want to function to do.