Function in python



Function is a block of statement,It will be executed whenever it is called in the program.



Syntax:



def function_name():
    
     # body of the function

function_name()







Example-1
def show():

    print("I am good")
    
show() 


Output



I am good







Example-2
def message(Name):

    print(Name)
    
message("Hari")


Output



Hari