Guest User

Untitled

a guest
Dec 17th, 2018
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.45 KB | None | 0 0
  1. #Define payment, knowing that up to 40 hours it is normal rate, and above that every hour is paid at 150%.
  2. totalHours = input("Enter the total amount of worked hours:n")
  3. hourlyWage = input("Enter the payrate per hour:n")
  4. if totalHours <= 40:
  5. regularHours = totalHours
  6. overtime = 0
  7. else:
  8. overtime = float(input(totalHours - 40))
  9. regularHours = float(input(40))
  10. payment = hourlyWage*regularHours + (1.5*hourlyWage)*overtime
  11. print (payment)
Add Comment
Please, Sign In to add comment