title: How does (num-1) work in line 3? I'm making a script with a recursive function to display the sum of the first n integers. (newbie)
body: <p>I want to know how does (num-1) work in line number 3. In my head it looks like this:
  num+(num-1) = 5 + (5-1) = 5 + 4 = 9. But later I realized that wasn't the case. How does it work?</p>
  <p>THIS IS MY CODE:</p>
  <pre><code>def find_sum(num):
      if num!=0:
          return num + find_sum(num-1)
      else:
          return num
  num = int(input(&quot;Enter a number: &quot;))
  print(&quot;The sum of the first &quot; , num ,&quot; integers is &quot;, find_sum(num))
  </code></pre>