 Hi again, in this lesson, we're going to talk about that how to write function for factorial in Python programming language. We're going to use in this example recursive function. Recursive function is a function that calls itself. So we're going to write our factorial function. We'll define our factorial function with an argument and this argument will be the number of which we want to find the factorial. And as you know, for example, the factorial of number 3 is the same as 3 times the factorial of number 2 and that is the same as 3 times 2 times factorial of 1 and that is the same as 3 times 2 times 1 times factorial of 0. And we know that factorial of 0 is number 1 by the definition. So we will use recursive function and in each iteration, we're going to call our factorial function once again. So this function is going to call the same that function inside it. So we know by definition that factorial of 0 is 1. So if we're having that our number n is 0, we're going to return number 1. And else, we're going to return that same number and we're going to call our function again. But with argument which is lesser by 1 than this original number. Okay, and that's it. That's all that we need to write inside our function. And let's try to call our function and provide, for example, number 3. We want to find factorial of number 3 and factorial of 3 is number 6. So in this example, if we have number 3, first our function will be here and it will return that number 3 times factorial of number 3 minus 1, which is in our case number 2. And then again, it will return 3 times 2 times factorial of number 1. And in the last pass of our function, we're going to get 3 times 2 times 1 times factorial of 0. But if n is 0, the returning value will be number 1. So the multiplication of these numbers, we will get number 6. That's all in this lesson. Thanks for watching. Bye-bye.