Function is a block of code and used when it is required .
It runs only when it is called.
It can return data as a result.
Example:
def fun():
print(“this is function”)
Calling a function will be like :
def fun():
print(“hai”)
fun()
Function with arguments:
def person(name):
print(“hai” + name)
person(“sia”)
person(“kinn”)