recursion one thing that we might point out in this recursive function the else is not necessary when the python interpreter encounters return statementthe interpreter returns immediately and does not execute the rest of the function soin sect if the function returns in the then part of the if statementthe rest of the function is not executed if is not zerothen we want to execute the code on the else statement this means we could rewrite this function as shown in sect no else needed def recsumfirstn( )if = return return recsumfirstn( - the format of the code in sect is common way to write recursive functions sometimes recursive function has more than one base case each base case can be handled by an if statement with return in it the recursive case does not need to be in an else when all base cases result in return the recursive case comes last in the recursive function definition tracing the execution of recursive function early in this you were given the mandate "don' think too hardwhen writing recursive function understanding exactly how recursive function works may be bit difficult when you are first learning about them it may help to follow the execution of recursive function in an example consider the program in the previous section let' assume that the user entered the integer at the keyboard when this program begins running it will have an activation record on the run-time stack for the module and the main function when the program gets to line in the code of sect where the recsumfirstn function is first calleda new activation record will be pushed for the function callresulting in three activation records on the run-time stack the python interpreter then jumps to line with pointing at the number as shown in the picture of fig execution of the function proceeds the value of is not zeroso python executes line where there is another function call to recsumfirstn this causes the python interpreter to push another activation record on the run-time stack and the interpreter jumps to line again this time the value of is but againthis is not zeroso line is executed and another activation record is pushed with new value of for this repeats two more times for values of and for the important thing to note in this program execution is that there is one copy of the variable for each recursive function call an activation record holds the local variables and parameters of all variables that are in the local scope of the function this copy belongs to 'acha