title: Trying to solve the collatz sequence project at the end of ch. 3 from "automate the boring stuff with python"
body: <p>At first I didn't include a while loop and I would have to rerun the program with the value from the previous time (ie it wouldn't recycle the results back through the loop) So i added the while loop to try and correct that.  Now When I run it, it gets stuck in an infinite loop.  Brand new trying to figure this stuff out.  Thanks in advance.
  the instructions for the project are at the bottom of this link<br />
  <a href="https://automatetheboringstuff.com/2e/chapter3/" rel="nofollow noreferrer">https://automatetheboringstuff.com/2e/chapter3/</a></p>
  <pre><code>def collatz(number):
      if number % 2 == 0:
          print(number // 2)
      elif number % 2 != 0:
          print(3 * number + 1)
  
      while number != 1:
          collatz(number)
  
  number = int(input('enter a number:')  )
  collatz(number)
  </code></pre>