Post

@PythonPr Answer: C). 30
Here's why;
Step 1: Analyze the function call The function fun(x, y) is called with initial values (x=3) and (y=5). The function is recursive, meaning it calls itself until the base case ((x==0)) is met
Step 2: Trace the first recursive
English

@PythonPr 1. This is a recursive function call;
2. fun(3, 5) calls fun(3 - 1, 3 * 5), which is fun(2, 15).
3. fun(2, 15) calls fun(2 - 1, 2 * 15), which is fun(1, 30).
4. fun(1, 30) calls fun(1 - 1, 1 * 30), which is fun(0, 30).
5. since x == 0, program will return y & y == 30
English

@PythonPr C). fun(x, y) keeps calling itself while reducing x and multiplying y. So fun(3,5) becomes: fun(2,15) to fun(1,30) to fun(0,30). When x hits 0, it returns the final value. Each step stacks a multiplication, not addition. So the end result is 30.
English

@PythonPr C) 30 is the right answer.
Here we are using recursive function .
When function call it's self again and again.
English












