0

What is error in this code?? It is giving indentation error means what?

def computepay (h,r): if h>40: p=1.5*r*(h-40)+(40*r) else: p=h*r return p; hrs=input("enter hrs:") hr=float(hrs) rphrs=input("enter hrs:") rphr=float(rphrs) p=computpay(hr,rphr) print("pay",p)

1st Jun 2020, 5:59 AM
__n
__n - avatar
3 Respostas
0
In third last line hr should be replaced by rphr
1st Jun 2020, 6:12 AM
Peter Parker
Peter Parker - avatar
0
return p: and not return p;
1st Jun 2020, 6:27 AM
Ashraf Vp
Ashraf Vp - avatar