0
Tasha Check on line no 15 I have printed the value of i and fun1 https://code.sololearn.com/cpa9uVSqIl7k/?ref=app Here when n is 5 then i = 0 + fun1(5) = 0 + 5 = 5 after this first iteration n will be 4 because we are calling function fun2(n - 1) so when n will be 4 then i = 5 + fun1(4) = 5 + 9 = 14// here 5 is previous value of i and 9 is a combination of previous value of fun1 and n = 4 Now after this iteration n will be 3 and i = 14 + 12 = 26 here 14 is previous value of i and 12 is a combination of previous value of fun1 and n = 3 Now after this iteration n will be 2 and i = 26 + 14 = 40 here 26 is previous value of i and 14 is a combination of previous value of fun1 and n = 2 Now after this iteration n will be 1 and i = 40 + 15 = 55 here 40 is previous value of i and 15 is a combination of previous value of fun1 and n = 1 after this iteration n will be 0 so no further process.
20th Mar 2020, 8:36 PM
A͢J
A͢J - avatar