Skip to content

Instantly share code, notes, and snippets.

@nnguyen168
Last active May 24, 2020 07:38
Show Gist options
  • Save nnguyen168/a5ed4a4a2102d01fa9eaa26961afcbc7 to your computer and use it in GitHub Desktop.
Save nnguyen168/a5ed4a4a2102d01fa9eaa26961afcbc7 to your computer and use it in GitHub Desktop.
Code without redundant comments
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