Try this exercise. Click the correct answer from the options.
What would be the result of the following recursive function?
PYTHON
1def func(num):
2 if n == 4:
3 return n
4 else:
5 return 2 * func(n+1);
6
7func(2)
Click the option that best answers the question.
- 4
- 3
- 16
- infinity