Advertisement
Guest User

Wages Calculator

a guest
Feb 14th, 2016
51
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.62 KB | None | 0 0
  1. overtime = 0
  2. overtimePay = 0
  3. name = input(Employee name: )
  4. rate = float(input(Hourly rate: )
  5. hours = float(input(Hours worked: )
  6.  
  7. if hours > 40:
  8. totalHours = hours
  9. overtime = hours - 40
  10. regularPay = 40 * rate
  11. overtimePay = overtime * 1.5 * rate
  12. hours = 40
  13. totalPay = regularPay + overtimePay
  14. else:
  15. regularPay = hours * rate
  16. totalHours = hours
  17. totalPay = regularPay
  18.  
  19. print("Pay stub for", name,)
  20. print("Earnings Rate Hours Pay")
  21. print("Regular", rate, " ", hours, " ", regularPay,)
  22. print("Overtime", rate*1.5, " ", overtime, " ", overtimePay,)
  23. print("Total", totalHours, " ", totalPay,)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement