hrs = input("Enter Hours:") h = float(hrs) rph=float(input("Enter rate per hours:")) if hrs>40: print (40*rph +(h-40)*rph*1.5) else: print(h*rph)