title: Python error calculating program
body: <p>Ask the user to enter payroll information for the company.  Set up a loop that continues to ask for information until they enter “DONE”.  For each employee ask three questions:</p>
  
  <p>name (first &amp; last)
  hours worked this week (only allow 1 through 60)
  hourly wage (only allow 6.00 through 20.00)
  VALIDATE the hours worked and the hourly wage, and make sure a name is entered.</p>
  
  <p>Calculate each employee’s pay, and write it out to a sequential file.   Be sure to include file I/O error handling logic.   </p>
  
  <p>Include only the weekly pay
  Weekly pay is calculated: 
  For (1-40 hours) it is hourly rate * hours worked
  For (41-60 hours) it is (hours worked – 40) * (hourly rate * 1.5) 
  + hourly rate * 40</p>
  
  <p>After all the employees are entered, read in the sequential file into a list named PAY for the weekly pay of each employee.  Sort the list.  Now print the lowest, highest, and average weekly pay for the week.</p>
  
  <p>I am having obvious problem with this code</p>
  
  <pre><code>while len(eName)&gt;0:
       eName=raw_input("\nPlease enter the employees' first and last name. ")
       hWork=raw_input("How many hours did they work this week? ")
       hoursWork=int(hWork)
       if hoursWork &lt; 1 or hoursWork &gt; 60:
           print "Employees' can't work less than 1 hour or more than 60 hours!"
  
       else:
           pRate=raw_input("What is their hourly rate? ")
           payRate=int(pRate)
           if payRate &lt; 6 or payRate &gt; 20:
                print "Employees' wages can't be lower than $6.00 or greater than $20.00!"
           if hoursWork &lt;=40:
                grossPay=hoursWork*payRate
           else:
                grossPay=((hoursWork-40)*(payRate*1.5))+(40*payRate)
           lsthours.append(grossPay)
       print grossPay
       print lsthours
  
  
  
       ePass=raw_input("Type DONE when finished with employees' information. ")
       ePass.upper() == "DONE"
       if ePass == "DONE":
            break
       else:
            continue
  </code></pre>