1. 10
2. 25
3. Junk value
4. Error
25
1. Error
2. 4
3. Junk value
4. 1
1
1. locals()globals()
2. locals()locals()
3. globals()locals()
4. globals()globals()
globals()
locals()
1. A function that calls itself
2. A function execution instance that calls another execution instance of the same function
3. A class method that calls another class method
4. An in-built method that is automatically called
A function execution instance that calls another execution instance of the same function
1. True
2. False
False
1. Recursive function can be replaced by a non-recursive function
2. Recursive functions usually take more memory space than non-recursive function
3. Recursive functions run faster than non-recursive function
4. Recursion makes programs easier to understand
Recursive functions run faster than non-recursive function
1. num*fact(num-1)
2. (num-1)*(num-2)
3. num*(num-1)
4. fact(num)*fact(num-1)
num*fact(num-1)
1. 13
2. 7
3. Infinite loop
4. 17
17
1. 011
2. 110
3. 3
4. Infinite loop
110
1. A recursive function that has two base cases
2. A function where the recursive functions leads to an infinite loop
3. A recursive function where the function doesn’t return anything and just prints the values
4. A function where the recursive call is the last thing executed by the function
A function where the recursive call is the last thing executed by the function