Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #Define payment, knowing that up to 40 hours it is normal rate, and above that every hour is paid at 150%.
- totalHours = input("Enter the total amount of worked hours:n")
- hourlyWage = input("Enter the payrate per hour:n")
- if totalHours <= 40:
- regularHours = totalHours
- overtime = 0
- else:
- overtime = float(input(totalHours - 40))
- regularHours = float(input(40))
- payment = hourlyWage*regularHours + (1.5*hourlyWage)*overtime
- print (payment)
Add Comment
Please, Sign In to add comment