title: hailstone sequence using recursion in python
body: <p>Does it make sense to implement using recursion? I wrote some bad solution below.
  Please correct me</p>
  
  <pre><code>def hailstone(n):
      if(n&lt;0):
          print("Invalid input")
          return None
      if(n==1):
          print(1)
          return None
      if(n%2 == 0):
          print(n)
          hailstone(n/2)
      if(n%2==1):
          print(n)
          hailstone((n*3) + 1)
  </code></pre>
  
  <p>My question:</p>
  
  <p>How do i move <code>n&lt;0</code> condition to a right place? Did i miss or add extra return statement?</p>