recursion uses divide and conquer strategy to solve problems if > fact( )= *fact( - if = fact( )= !=fact( )= *fact( * *fact( * * *fact( * * * *fact( * * * * *fact( * * * * * = advantages recursive functions make the code look clean and easy complex task can be broken into sub problem using recursion sequence generation is easy disadvantages sometimes logic behind recursion is hard to follow recursive calls are expensive ,as they take lot of memory and time recursive functions are hard to debug following is an example for recursive function which calculates factorial of numberdef fact( )"""returns the factorial of number using recursion ""if == or == return elsereturn *fact( - =int(input("enter value")print("factorial=",fact( )in the above example test inside triple quotes is called docstring or documentation string the docstring of function can be printed by writing function_name __doc__ following is an example for recursive function which calculates gcd of two numbersdef gcd( , )rem % if rem = return elsereturn gcd(yrembv prasanthi dept of cse page