title: Using the while loop statement to divide, count, and multiply in Python 3.x
body: <p>I'm fairly novice to Python (3.x) and I am given this task of E.coli bacteria.</p>
  
  <p>Here are the key points I have listed from the task:</p>
  
  <p>•   Number of E.coli bacteria doubles every 20 minutes</p>
  
  <p>•   User enters a target number of bacteria and is <strong>told the time it will take a single E.coli to divide into the target number of bacteria, to the nearest 20 minutes</strong></p>
  
  <p>•   The program must make use of the <strong>while</strong> loop</p>
  
  <p>•   The program should reject non-numeric inputs or a target number over 130,000</p>
  
  <p>Therefore, am I right in speaking that... Targetnumber / 2, count each time it halves until number gets to 1, number of count * 20 mins</p>
  
  <p>So far in my code I have the user input of the target number (under 130,000) and validation if it's not numeric:</p>
  
  <pre><code>while True:
      try:
          targetnumber = int(input('Enter the target number of E.coli under 130000: '))
          if 130000 &gt;= targetnumber:
              break
      except ValueError:
          print("Please enter a numerical target number input under 130000.")
          continue
      else:
          print("Target number must be under 130000.")
  </code></pre>
  
  <p>However I am finding it difficult to implement targetnumber / 2, count each time it halves until number gets to 1, number of count * 20 mins in my code using a <strong>while</strong> loop. </p>
  
  <p>If you could help and ELI5 that would be much appreciated. Many thanks</p>