Computer Science
Related Questions
What are the two cases required in a recursive function?
What is base case?
Is it necessary to have a base case in a recursive function? Why/Why not?
Identify the base case(s) in the following recursive function:
def function1(n): if n == 0: return 5 elif n == 1: return 8 elif n > 8 : return function1(n-1) + function1(n-2) else: return -1