Imagine you want to create a square with sides of a particular length. Additionally, you want to color it. You can create two separate functions to perform the above tasks. The first function will make a square of the specified length. You can use the second function to color it based on the specifications. Thus, as we can understand, a function is used to perform a specific task. If you define the function yourself, it is a user-defined function. On the other hand, the Python function that come along with Python are known as in-built functions. All the functions apart from in-built functions and library functions come under the category of user-defined functions. You can give any name to a user-defined function. The only restriction is that the name should not be a Python keyword.