Consider the following recursive function: def rec1(aList,first,last): if first==last: return aList[first] else: return aList[last]*rec1(aList,first,last-1) Show the output of the following call (show...


Consider the following recursive function:


def rec1(aList,first,last):


        if first==last:


            return aList[first]


        else:


            return aList[last]*rec1(aList,first,last-1)


      Show the output of the following call (show your work and all recursive calls):


print(rec1([1,2,3,4,5,6,7],3,5))?




describe the task of the rec1 function.



Jun 08, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here