Recursion
1. How many stars will the following code output for a given positive value of n:
2. What will be the ouptut of the following function call: fun2(20); where fun2 is defined as:
3. What will be the ouptut of the following function call: fun3(100); where fun3 is defined as:
4. In Python, which module or library allows you to control the maximum recursion depth?
5. What is the time complexity of the following recursive function for computing Fibonacci numbers?
6. How many stars will the following code output for a given positive value of n:
7. What will be the output of the following function call: fun2(20); where fun2 is defined as:
8. What will be the output of the following function call: fun3(100); where fun3 is defined as:
9. Which of the following is a valid way to write a recursive function for calculating the Fibonacci sequence?
10. Consider the following recursive function fun(x, y). What is the value of fun(4, 3)?
Explanation
Explanation
Explanation
Explanation
Explanation