def computepay(hours, rate):
return hours * (rate * 1.5)
hours_in = float(input("Enter Hours: "))
rate_in = float(input("Enter Rate: "))
regular_hours = hours_in if hours_in <= 40.0 else 40.0
ot_hours = 0 if hours_in <= 40.0 else hours_in - 40.0
pay = (regular_hours * rate_in) + computepay(ot_hours, rate_in)
print("Total Pay is ---> " + str(pay))
def computepay(hours, rate):
return hours * (rate * 1.5)
hours_in = float(input("Enter Hours: "))
rate_in = float(input("Enter Rate: "))
regular_hours = hours_in if hours_in <= 40.0 else 40.0
ot_hours = 0 if hours_in <= 40.0 else hours_in - 40.0
pay = (regular_hours * rate_in) + computepay(ot_hours, rate_in)
print("Total Pay is ---> " + str(pay))