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.
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here