1def computepay(h,r):
2 if h > 40:
3 pa = 40 * r + (h-40)*1.5*r
4 else:
5 pa = h * r
6 return pa
7
8hrs = input("Enter Hours:")
9h = float(hrs)
10rate = input("Enter Rate")
11r = float(rate)
12p = computepay(h,r)
13
14print("Pay",p)