Question: why is my python code not running. i need help fixing it . print ( Pay calculator will give your paycheck amount based on

why is my python code not running. i need help fixing it.
print("Pay calculator will give your paycheck amount based on your pay rate and hours worked. Overtime is calculated at time and a half.")
payRate = float(input('Enter your pay rate per hour:
'))
totalHours = float(input('Enter the amount of hours worked:
'))
if totalHours <=40:
totalPay = totalHours * payRate
else:
otHours = totalHours -40
regHours = totalHours - otHours
totalPay =(otHours * payRate *1.5)+(regHours * payRate)
print('Your paycheck will be: $',"{:.2f}".format(totalPay))

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!