Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- overtime = 0
- overtimePay = 0
- name = input(Employee name: )
- rate = float(input(Hourly rate: )
- hours = float(input(Hours worked: )
- if hours > 40:
- totalHours = hours
- overtime = hours - 40
- regularPay = 40 * rate
- overtimePay = overtime * 1.5 * rate
- hours = 40
- totalPay = regularPay + overtimePay
- else:
- regularPay = hours * rate
- totalHours = hours
- totalPay = regularPay
- print("Pay stub for", name,)
- print("Earnings Rate Hours Pay")
- print("Regular", rate, " ", hours, " ", regularPay,)
- print("Overtime", rate*1.5, " ", overtime, " ", overtimePay,)
- print("Total", totalHours, " ", totalPay,)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement