title: Run while loop one extra time after condition is met
body: <p>I am making an area calculator to help me understand the basics of Python, but I want to do some type of validation on it - if a length is less than zero, then ask again.
  I've managed to do this with the 'validation' code inside the function for the shape (e.g. inside the 'square' function) but when I put the validation code in a separate function - 'negativeLength,' it doesn't work. This is my code in the separate function:</p>
  
  <pre><code>def negativeLength(whichOne):
      while whichOne &lt; 1:
          whichOne = int(input('Please enter a valid length!'))
  </code></pre>
  
  <p>When I run this by calling 'negativeLength(Length)' it will ask me for the length again (as it should) but when I enter the positive length, the condition is met and so the actual loop does not run.</p>
  
  <p>I have also tried (after following <a href="https://stackoverflow.com/questions/743164/do-while-loop-in-python">Emulate a do-while loop in Python?</a>)</p>
  
  <pre><code>def negativeLength(whichOne):
      while True:
          whichOne = int(input('Please enter a valid length!'))
          if whichOne &lt; 1:
              break
  </code></pre>
  
  <p>... but that doesn't work either.</p>
  
  <p>I've put the parameter as 'whichOne' because the circle's 'length' is called Radius, so I'd call it as negativeLength(Radius) instead of negativeLength(Length) for a square.</p>
  
  <p>So is there any way to make the while loop finish after the 'whichOne = int(input...)'?</p>
  
  <p>Edit: I'm using Python 3.3.3</p>