title: python: cannot get final return
body: <p>declaration: this is an assignment. i've tried different combinations to move the variable [totalExposure] inside my code to get the return but failed.
  question: find radiation exposure within a period of time by using recursion. 
  problem: i can get all the calculations correctly [i checked it in online python executor] but when the process comes tothe final return, the result is [none]. i don't know why my code can't return the final calculation result. 
  wish: some guru out there can give me some clues thanks.</p>
  
  <pre><code>global totalExposure
  totalExposure=0 
  
  def f(x):
      import math
      return 10*math.e**(math.log(0.5)/5.27 * x)
  
  def radiationExposure(start, stop, step):
  
      time=(stop-start)
      newStart=start+step
  
      if(time!=0):
          radiation=f(start)*step
          radiationExposure(newStart, stop, step) 
          global totalExposure
          totalExposure+=radiation   
      else:
          return totalExposure
  </code></pre>