title: Define of Series Sum Using Python
body: <pre><code>def Series_Sum(arg1, arg2, function):
      for arg1 in range(arg2):
          result =+ function(arg1) 
          return result
  
  Series_Sum(0,10, arg1)
  </code></pre>
  
  <p>I am trying to define series summation like mathematical symbol "Sigma" while its function is as much as detached and could be called later on from the different defining.</p>
  
  <p>above is what I had made but it returns error :</p>
  
  <p>"arg1" is not defined.</p>
  
  <p>any solutions?</p>
  
  <p>Add :</p>
  
  <pre><code>def Series_Sum(arg1, arg2):
      for arg1 in range(arg2+1):
          result =+ arg1       
      return result
  
  print(Series_Sum(0,10))
  </code></pre>
  
  <p>Why it does not return 55?</p>