that interestinglyearly programming languagessuch as cobol and fortrandid not originally use call stacks to implement function calls but because of the elegance and efficiency that recursion allowsalmost all modern programming languages utilize call stack for function callsincluding the current versions of classic languages like cobol and fortran each box of recursive trace corresponds to an activation record that is placed on the call stack during the execution of recursive function at any point in timethe content of the call stack corresponds to the chain of boxes from the initial function invocation to the current one to better illustrate how call stack is used by recursive functionswe refer back to the python implementation of the classic recursive definition of the factorial functionnn( )( with the code originally given in code fragment and the recursive trace in figure the first time we call factorialits activation record includes namespace storing the parameter value the function recursively calls itself to compute ( )!causing new activation recordwith its own namespace and parameterto be pushed onto the call stack in turnthis recursive invocation calls itself to compute ( )!and so on the chain of recursive invocationsand thus the call stackgrows up to size with the most deeply nested call being factorial( )which returns without any further recursion the run-time stack allows several invocations of the factorial function to exist simultaneously each has an activation record that stores the value of its parameterand eventually the value to be returned when the first recursive call eventually terminatesit returns ( )!which is then multiplied by to compute nfor the original call of the factorial method the operand stack interestinglythere is actually another place where the python interpreter uses stack arithmetic expressionssuch as (( ( ))/eare evaluated by the interpreter using an operand stack in section we described how to evaluate an arithmetic expression using postorder traversal of an explicit expression tree we described that algorithm in recursive wayhoweverthis recursive description can be simulated using nonrecursive process that maintains an explicit operand stack simple binary operationsuch as bis computed by pushing on the stackpushing on the stackand then calling an instruction that pops the top two items from the stackperforms the binary operation on themand pushes the result back onto the stack likewiseinstructions for writing and reading elements to and from memory involve the use of pop and push methods for the operand stack