title: How recursion works in this code snippet?
body: <pre><code>def tri_recursion(k):
      if(k&gt;0):
          result = k+tri_recursion(k-1)
          print(result)
      else:
          result = 0
      return result
  
  
  tri_recursion(8)
  </code></pre>
  
  <h1>output of the function with argument 8</h1>
  
  <pre><code>1
  3
  6
  10
  15
  21
  28
  36
  </code></pre>