sscasc@tumkur exampleto find factorial using recursion def main() =int(input("enter nonnegative integer")print("factorial of" "is",factorial( )print( "factorial( )print( "factorial( )print( "factorial( )return the factorial for the specified number def factorial( )if = base case return elsereturn *factorial( - recursive call main()call the main outputenter nonnegative integer factorial of is profiling profiling means having the application run while keeping track of several different parameterslike the number of times function is calledthe amount of time spent inside itand so on profiling can help us find the bottlenecks in our applicationso that we can improve only what is really slowing us down python includes profiler called cprofile it breaks down your entire script and for each method in your script it tells youncallsthe number of times method was called tottimetotal time spent in the given function (excluding time made in calls to subfunctionspercalltime spent per call or the quotient of tottime divided by ncalls cumtimethe cumulative time spent in this and all subfunctions (from invocation till exitthis figure is accurate even for recursive functions percallis the quotient of cumtime divided by primitive calls filenamelineno(function)provides the respective data of each function sp_python programming