Recursion

1. How many stars will the following code output for a given positive value of n:

Explanation

Explanation

Explanation

Explanation

Explanation

Explanation

Explanation

2. What will be the ouptut of the following function call: fun2(20); where fun2 is defined as:
Explanation

Explanation

Explanation

Explanation

Explanation

Explanation

Explanation

Explanation

3. What will be the ouptut of the following function call: fun3(100); where fun3 is defined as:

Explanation

Explanation

Explanation

Explanation

4. In Python, which module or library allows you to control the maximum recursion depth?
Explanation

Explanation

Explanation

Explanation

Explanation

Explanation

Explanation

Explanation

5. What is the time complexity of the following recursive function for computing Fibonacci numbers?
Explanation

Explanation

Explanation

Explanation

Explanation

Explanation

Explanation

Explanation

6. How many stars will the following code output for a given positive value of n:

Explanation

Explanation

Explanation

Explanation

Explanation

Explanation

Explanation

7. What will be the output of the following function call: fun2(20); where fun2 is defined as:
Explanation

Explanation

Explanation

Explanation

Explanation

Explanation

Explanation

Explanation

8. What will be the output of the following function call: fun3(100); where fun3 is defined as:

Explanation

Explanation

Explanation

Explanation

9. Which of the following is a valid way to write a recursive function for calculating the Fibonacci sequence?

Explanation

Explanation

Explanation

Explanation

Explanation

10. Consider the following recursive function fun(x, y). What is the value of fun(4, 3)?

Explanation

Explanation

Explanation

Explanation

Explanation

Explanation

Explanation

Explanation

Explanation