Guest User

Untitled

a guest
Feb 21st, 2018
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.76 KB | None | 0 0
  1. def GetInfo():
  2.  
  3. lstNames = []
  4. lstHours = []
  5. lstRate = []
  6.  
  7. blnDone = False
  8. while blnDone == False:
  9. strName = raw_input("nEnter employee full name: ")
  10. if len(strName) == 0: #did the user press enter?
  11. print "Invalid entry. Please try again.n"
  12. strName = raw_input("Enter a your full name: ")
  13. else:
  14. lstNames.append(strName.title())
  15.  
  16. strHours = raw_input("Enter employee hours worked (between 1-60): ")
  17. if int(strHours) < 1 or int(strHours) > 60:
  18. print "Invalid entry. Please try again.n"
  19. strHours = raw_input("Enter your hours worked (between 1-60): ")
  20. else:
  21. lstHours.append(int(strHours))
  22.  
  23. strRate = raw_input("Enter employee hourly wage (between 6.00-20.00: ")
  24. if float(strRate) < 6.00 or float(strRate) > 20.00:
  25. print "Invalid entry. Please try again.n"
  26. strRate = raw_input("Enter your hourly wage (between 6.00-20.00: ")
  27. else:
  28. lstRate.append(float(strRate))
  29.  
  30. strDone = raw_input("Are you done entering employee information? (yes/no): ")
  31. if strDone.lower() == "yes":
  32. blnDone = True
  33. elif strDone.lower()== "no":
  34. blnDone = False
  35. elif strDone.lower() != "yes" or strDone != "no":
  36. print "Invalid entry. Please try again.n"
  37. strDone = raw_input("Are you done entering employee information? (yes/no): ")
  38.  
  39. return strName, strHours, strRate, lstNames, lstHours, lstRate
  40.  
  41. def payFunc():
  42. info = getInfo()
  43. lstHours = info[3]
  44. lstRate = info[5]
  45. if lstHours >40:
  46. pay = (40*lstRate)+((lstHours-40)*(1.5*lstRate))
  47. elif lstHours =<40:
  48. pay = (lstRate*lstHours)
  49. return(pay)
  50.  
  51. print(payFunc)
Add Comment
Please, Sign In to add comment