0:03

We've seen that Python has several

Â mathematical operators, like multiplication and subtraction, and

Â we know that the mathematical operation

Â multiplication is associated with an asterisk symbol.

Â There are lots of other operations that we might want to do,

Â with or without math, and not enough meaningful symbols to go around.

Â So, for example, we may want to figure out, which of several

Â numbers is the largest one, and there's no symbol associated with that operation.

Â Instead, Python has a set of built of

Â functions that allows, allows us to perform these operations.

Â So take a look at those now.

Â So let's start with that example that I mentioned, which

Â is to find out which of several numbers is the largest.

Â The Python built in function that we'll use for that is the Max function.

Â So, the name of the function is Max. I use an open parenthesis.

Â And notice the yellow pop up box. That's

Â [INAUDIBLE]

Â help that is intended to remind

Â professional Python programmers what the function does.

Â And you probably won't understand it yet.

Â And that's to be expected.

Â And then I provide the arguments to function, so

Â in this case, I'm going to provide two arguments.

Â Pass two arguments to the function.

Â The arguments values are 36.7 and 23.4, so this is function call.

Â With arguments 36.7 and 23.4. When I hit Enter, Python will evaluate

Â that function call, and tell me that 36.7 is the bigger of the two numbers.

Â 1:32

The form of a function call is, the name of the function,

Â and open parenthesis, a comma separated list of expressions known as arguments.

Â And a closing parenthesis. When a function is called,

Â Python first evaluates the arguments then calls the function.

Â In a additon to call max with two arguments

Â we have the option of calling it with several.

Â So in this case we will call it with four arguments.

Â 2:01

We can also call not only with floats but with ints, so

Â this time I'm going to pass three int arguments to the function.

Â And finally it's possible to pass in arguments of two different types, so

Â we'll pass in a float argument along with an int argument this time.

Â 2:29

We can find out which built-in functions are

Â available by using another built-in function named dir.

Â So I'm going to call dir now.

Â And I'm asking for a listing of the built-in functions.

Â When I hit Enter, there we go. We got a

Â huge, long list. Kind of an overwhelming list, actually.

Â The thing is, for the moment, is that we are going to completely ignore all of

Â this, and we're only going to focus on those names that have lowercase letters.

Â Entirely lowercase.

Â 3:03

So this is what we care about for the moment.

Â We can see that Max appears in the list, and,

Â [INAUDIBLE]

Â for the moment explore another function named ABS.

Â The built-in function help can be used to find out more about ABS.

Â We'll call help, passing ABS as an argument to the function.

Â And we get back a description of ABS. From this description, we can see that

Â ABS had takes one argument. A number and that it will,

Â according to this symbol, which means return; also return a number.

Â So it's going to return the absolute value of the argument.

Â 4:26

The third argument is inside square brackets.

Â Indicating that is an optional argument.

Â So z is optional.

Â That means that when we call pow, we need to

Â call it with at least two, or possibly three arguments.

Â Pow will then return

Â a number.

Â