Hi. Let us study a function taking multiple inputs. In the previous video clip, we studied a function taking only one input, but at this time let me introduce a function taking two inputs. It means that a function can take multiple inputs but one simple case is taking two inputs. Define, def, myfunction. That is the name of a function, again, in the parenthesis. There are two input variables, x and y. They are separated by what? Comma. Comma separates two variables. Then, at the end, there is colon, this is the headline of a function. Then docstring comes. This function performs addition, multiplication, and division of the two variables. It returns addition, multiplication value, and division value. It means that two inputs are provided in to the function. That function transforms two input variables in order to produce three outputs. Those x and y variables are local variables. What is the meaning of a local variable? A local variable means that the variables used in function only exist to reading that function. It means that you can use the same name variable outside of that function. There is no overlapping between those local variables and global variables that exist in your working space but not included in a function. You can use same variable name for many functions because those same variable names only works within specific function. They are often called local variables. Let me execute this cell then nothing happens because you only created a margin. Calculate adding two values, multiplying two values, and dividing two values. You are actually creating a software margin. We call that function. We have x is 15, y is the three, then what happens? Eighteen, 45, and 5. That is the calculated value. Then you may ask, "Why are we creating a function?" Because you don't have to repeat this, multiplication, addition, and division by writing many times. Whenever your characterize you need to type the formula but once you create a function you don't have to. You simply provide input values then any calculation is done. Turn Key 4. Not executed so "Control", "Enter" then the job is done. Once you create function, you can do the same production process repetitively without creating, without typing all the formula again and again. That is the benefit of using function. Let me give you another function. This is slightly different from the previous ones that we already studied? Here's a function without parameters, though x and y reading parenthesis, they are sometimes called arguments or sometimes they are called parameters. Two words are interchangeably used in Python coding. Define, now we are making findmin, minimum value, finding minimum value function. This is headline. I already, so many times, explained how to write the headlines so I'm not explaining. Right below the headline our docstring comes, finding the minimum value, minimum among three integers. But at this time, reading parenthesis, there's nothing, no variable at all. In this variable has no arguments or parameters. Instead, three variables are here asking, x input function asking enter first integer, second integer, third integer. Each values are assigned to local variable x, y, z. Then there is a working process defined by this function. First, x is chosen as minimum. It's just the starting point. Then there's if statement. Y is compared to x already, which is announced as a minimum. If y is smaller than minimum means that y is the minimum. Minimum becomes y. If y is greater than minimum, still x is minimum. Another, if sentence comes, z is smaller than minimum. If z is smaller than y it means that z is minimum but if y is greater than x, x is still minimum, but if z is smaller than x, then z is minimum. Anyway, minimum value is returned. This is a way of comparing three values and finding minimum value. Let me execute the cell, then find the main function is created. It does not take any value so simply you're asked to find the mean not providing any value. Then it asks us first value, for example, 56, then second, 45, then 17. Then which way is minimum? Forty-five, so 45 is returned. In this case, we define the function not taking any value, but asking to provide values. In this case, what if we provide the value here like 56, 45, 78. Then what happens? You see, error, error. Here, TypeError. Find the mean, takes zero positional arguments but three we're given, so violating the definition of their function. If nothing is announced here, then, actually, it should be nothing otherwise the function is not working. Instead, it is asking three numbers, 12, 11, 10, then 10 is the minimum. You can create a function which is not taking any input, but asking inputs. This is a slightly different function. But we can create a function for finding minimum values rather than using the long big size function. You can use built-in function provided by Python in order to create finding minimum value function. Here's another name. I simply added one, this one is different from the previous one. Due function is defined and it takes three values at this time, x, y, z. Another function that docstring says, another function for finding the minimum. Then simply return minimum mean here. Mean function is built-in function provided by Python. We are using that function. This is simpler than the previous one. Rather than creating the wheels again and again, if you can find a replaceable built-in function, use it rather than creating it. That it is easier way of doing coding. In this case, by executing the cell we created, find the mean one function. At this time, we are providing 12, 2, 1. Then which one is minimum? One. Actually, if we execute, one is returned. But here another value is printed, print the x, in this case. According to function, x is 12, but as I said before, those are local variables. They're only effective reading function. In this case, if I ask computer to print the value assigned task, three is returned because at this time x is global variable existing in my working space. Where that comes? Because I already announced to sum your x as your value three, here. I announced in my working space x is three. It means that x at this time is global variable. You can code it because it is existing on my working space. If you have a pencil on working space, you're simply using that function, you named it as a x. If you call x a pencil, you designated before. It will be printed. At this time it is Number 3. As I explained before once, function can be inserted in f string. At this time, what value will be returned? Eight. Eight is the minimum value. Here's another review question, true or false? The variables used in a function are global variables. Is it true or is it false? What is your answer? Your answer must be false because the variables used in a function, as I said before, local variables, they are effective only in a specific function. Remember that.