title: How to use an if/while loop together in Python?
body: <p>So basically I want to do this generate a random number (this I know how to do) if that number is even (or <code>number%2 == 0</code>) then divide it by 2 then if the resulting number is odd (or <code>number%2 &gt; 0</code>) then multiply by 3 and add 1. If that didn't make much sense here is an exmaple</p>
  
  <ul>
  <li>Pick a number like 26 (this is even so divide by 2)</li>
  <li>Resulting number is 13 (this is odd so multiply by 3 add 1)</li>
  <li>Resulting number is 40 (this is even so divide by 2) </li>
  </ul>
  
  <p>Continue this process until the number is == 1 </p>
  
  <p>I am not sure what loop to use to do this so any help is very appreciated! :) </p>