Last active
May 24, 2020 07:38
-
-
Save nnguyen168/a5ed4a4a2102d01fa9eaa26961afcbc7 to your computer and use it in GitHub Desktop.
Code without redundant comments
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def calculate_pay(hourly_pay_rate, work_hours, | |
overtime_pay_rate, overtime_work_hours, | |
is_eligible_overtime_rate): | |
total_pay = 0 | |
totay_pay = hourly_pay_rate * work_hours | |
if is_eligible_overtime_rate: | |
total_pay = total_pay + overtime_pay_rate * overtime_work_hours | |
else: | |
total_pay = total_pay + hourly_pay_rate * overtime_work_hours | |
return total_pay |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment