title: Recursive function to calculate sum?
body: <p>This is what I've got and I'm not sure why it's not working</p>
  
  <pre><code>def sum(n):
      if (n&gt;0):
          print (n)
          return sum(n)+sum(n-1)
      else:
          print("done doodly")
  
  number = int(input(":  "))
  sum(number)
  </code></pre>
  
  <p>For example if the use inputs 5, I want to program to calculate the sum of 5+4+3+2+1. What am I doing wrong ?</p>