hi all,
need help for the code below
how does python compute the above code?
how did k becomes greater than 0?

as per my understanding
if (k>0) then it should jump on else statement
need help for the code below
def tri_recursion(k): if(k>0): result = k+tri_recursion(k-1) print(result) else: result = 0 return result print("\n\nRecursion Example Results") tri_recursion(6)
Output:Recursion Example Results
1
3
6
10
15
21
how does python compute the above code?
how did k becomes greater than 0?



as per my understanding
if (k>0) then it should jump on else statement