Professional Documents
Culture Documents
Functions in Python
Functions in Python
Types of Functions:
There are three types of functions in python:
1. Library Functions (Built in functions)
2. Functions defined in modules
3. User Defined Functions
1. Library Functions: These functions are already built in the python library.
For example: type( ), len( ), input( ) etc.
3 User Defined Functions: The functions those are defined by the user are called
user defined functions.
PARAMETERS
OR
1) Positional arguments
The values of arguments are matched with parameters position wise.
2) Default Arguments
A parameter having default value in the function header is known as a default
parameter.
Q )What is the difference between parameters ( Formal Parameters )and arguments( Actual
Parameters)?
Function header: the function header specifies the name of the function, and
any arguments (inputs, or parameters) into the function.