def computepay(h,r):
if h > 40:
pay = 40 * r
h -= 40
pay += (r*1.5) * h
else:
pay = h*r
return pay
print(computepay(float(input("How many hours did you work? ")),float(input("What is your rate of pay"))))
I hope this helps!
6.4m questions
8.4m answers