hrs = input('Enter hours: ')
rts = input('Enter rates: ')
h=float(hrs)
r=float(rts)
def computepay(h,r) :
if h <= 40.0 :
pay = h * r
else :
hnew = h - 40.0
pay = (40.0 * r + (hnew * (r * 1.5)))
return pay
pay=computepay(h,r)
print ("Pay",pay)
1 Comments
def computepay(h, r):
ReplyDeleteif h<=40.0:
pay=h*r
return pay
elif h>40.0:
pay=(h*r)+(h-40)*r*1.5
return pay
h=float(input('Enter Hours:'))
r=float(input('Enter Rate:'))
pay = computepay(h, r)
print('Pay',pay)
Output=551.25
please help me what is wrong in this?