Types of Functions


☞ There are 3 types of functions :

1. Built-in functions
2. Functions defined in Module
3. User- defined functions

Built-in functions :

☞Python comes with a set of built-in functions that are readily available for use without the need to import any external module.

Examples : print(), len(), input(), max(), min(), etc.


Functions defined in Modules :

☞Python comes with a set of built-in functions that are readily available for use with the need to import any external module.

Examples : sin(), sqrt() in math module


User- defined functions :

☞You can define your own functions in Python using the def keyword.

Example : def add_numbers(a, b)