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

basic python questions mainly about functions

I didn't under stand functions at all, what are the limitations of the arguments how do arguments work, is a function a ver of a section of code? also why are there so many words that python understands like or, not ect and what is the best way to use this and when dose it glitch. also i would love to talk to some one in person about this if at all possible :P I have so many questions. chas Feldmann

thanks so much this answered a lot of questions i had thanks

1 Answer

Kenneth Love
STAFF
Kenneth Love
Treehouse Guest Teacher

what are the limitations of the arguments

The two major limitations are not having enough arguments (you pass the function 3 when it was only expecting 2) or the opposite of that, passing too few.

how do arguments work

Arguments are values that you're giving to your function so it can work. For example, if I have a function that adds two numbers together, it'll take two arguments. Those two arguments, when I call the function, will be the numbers I want added together.

def add(num1, num2):
    return num1 + num2

>>> add(5, 2)
7

is a function a ver of a section of code?

A function is a section of code, yes. It's a block of code that can be called/ran any time you need it.

why are there so many words that python understands like or, not ect

Because Python was created to be easily written and read again. You generally spend way more time reading code than you do writing it.

what is the best way to use this and when dose it glitch

The built-in keywords, things like in and for and not, won't easily break unless you overwrite them.

not = 8

Now not won't work as itself.

Sorry, I can't help you on the meeting someone in person, but there are Python groups all over the world, so I bet you have one nearby.