In the following function, what is the base case?

Loading

Choose the correct option.

In the following function, what is the base case?
def xfunction(n):
    if n == 1:
        return1
    else
        return n + xfunction(n – 1)

A. n is 1.
B. n is greater than 1.
C. n is less than 1.
D. no base case.

Leave a Comment