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)
3 Answers
0
In third last line hr should be replaced by rphr
0
return p: and not return p;