第9行的synthx错误无效

时间:2017-01-14 01:17:43

标签: python-2.7

我不确定我做错了什么,但它在第9行返回了无效语法,如果有人可以帮助你感谢你。

hrs = raw_input("Enter Hours:")
rate = raw_input ("Enter Rates:")
hrs = float(hrs)
rate = float(rate)

def computepay(hrs,rate):
    if hrs > 40:
        pay = (hrs * rate) + (rate * 1.5) + (hrs- 40)
        else:
            pay = hrs * rate
return pay


p = computepay(10,20)
print "Pay", p

0 个答案:

没有答案