So i had to convert my pseudocode to python but my output isnt coming out the way it should be.
i enter the 40 hours work and 20 pay rate but the gross pay isnt coming out (gross pay should be 800). can anyone tell me whats wrong?
BASE_HOURS = 40
OT_MULTIPLIER = 1.5
def main():
hours_worked = int(input('Enter the number of hours worked: '))
pay_rate = int(input('Enter the hourly pay rate: '))
if hours_worked > BASE_HOURS:
calc_pay_with_OT(hours_worked, pay_rate)
else:
calc_regular_pay(hours_worked, pay_rate)
def calc_pay_with_OT(hours, pay_rate):
overtime_hours = hours_worked - BASE_HOURS
overtime_pay = overtime_hours * pay_rate + OT_MULTIPLIER
gross_pay = BASE_HOURS * pay_rate + overtime_pay
print('The gross pay is $ '), gross_pay
def calc_regular_pay(hours, pay_rate):
gross_pay = hours * pay_rate
print('The gross pay is $ '), gross_pay
main()