the function code should indented properly function definition contains two partsfunction header function body the syntax of function definition is as followsdef function_name(arg arg /no arg)"""documentation string""statement block function header ,formal parameters body of function example for defining function without arguments is as followsdef sample()""this is sample program created by prashanthi""print("hello"print("python"example for defining function with arguments is as followsdef add( , )""this is sample program for addition""print( +bcalling function before calling functionit should be defined we call function to execute the code inside the function syntax for function call is as followsfunction_namefunction_name[arg arg function call,actual parameters egsample(add( ,bthe arguments or parameters passed in function call are called actual parameters the arguments used in the function header of function definition are called formal parameters when function is calledcontrol moves to the first line inside the function definition after the body of function definition is executedcontrol returns back to the next statement after the function call points to remember while calling functionbv prasanthi dept of cse page