title: Python input validation loop infinitely loops
body: <p>I'm attempting to utilize TeamTreehouse learning subscription &amp; this Starting Out With Programming Logic And Design book to attempt learning programming &amp; python. Currently I'm onto learning input validation which honestly appears more straightforward than I'd presumed it's just adding a purpose to loops/functions.</p>
  
  <p>Goal: To build out a program that will calculate an employee's gross pay via asking them for the inputs of hours worked as well as their pay rate. I've decided a while loop is less code (I could stand to be corrected though that's my perspective at this time) than writing this out as an if/else loop. At the time of writing this I don't have it fully built other than building &amp; testing my first input validation loop.</p>
  
  <p>Error: <strong>My payRates while loop never exits/ends whether I enter -10, 14 or 99 which I suspect has to do with setting it to check for multiple conditions?</strong> From the cross reference tutorial I found on while loops (url below) I don't see any "end while" command I have to wrap the command in (book is based on theory/pseudocode) whereas I'm not finding much substance material on multiple condition while loops.</p>
  
  <p>While Loop Tutorial
  <a href="http://www.tutorialspoint.com/python/python_while_loop.htm" rel="nofollow">http://www.tutorialspoint.com/python/python_while_loop.htm</a></p>
  
  <p>Python Code
  URL <a href="http://repl.it/mwU" rel="nofollow">http://repl.it/mwU</a></p>
  
  <pre><code>#///////////Variable Declarations///////////
  payRates=0
  hoursWorked=0
  #///////////Variable Declarations///////////
  
  #///////////payRates Input Validation///////////
  def payRate():
      payrate=input("Please enter your payrate.")
      while payRates &lt; float(7.50) or payRate &gt; float(18.25):
  #    while payRates&lt;7.50:# or payRates&gt;18.25:
          print("That is an invalid payrate, valid payrates are $7.50-$18.25.")
          payrate=input("Please enter a valid payrate.")
  
  #///////////payRates Input Validation///////////
  
  #///////////hoursWorked Input Validation///////////
  #while hoursWorked&lt;0: or hoursWorked&gt;40:
  #    print("That is an invalid amount of hours worked, a valid range is 0-40.")
  #    int(hoursWorked=input("Please enter valid hours worked.")    
  #///////////hoursWorked Input Validation///////////
  
  payRate()
  print(payRates)
  print(hoursWorked)
  </code></pre>