【发布时间】:2017-09-28 01:23:12
【问题描述】:
hours = input("Enter hours: ")
rate = input("Enter rate: ")
try:
hours = float(hours)
rate = float(rate)
except:
print("Enter real numbers")
def computepay(hours, rate):
if hours <= 40.0:
pay = hours * rate
return pay
elif hours > 40:
pay = 40 * rate
exhrs = (hours - 40) * (1.5 * rate)
totpay = pay + exhrs
return totpay
print("Pay: %s" % computepay(hours, rate))
【问题讨论】:
-
继续运行是什么意思?