Forums

I cannot find the mistake

Hi! I want a programme that works as follows: The user enters the hours and the rate and the programme returns what the user has to pay. The rate depends on the hours: the first 40 hours the rate is applied, from 41 hours up de rate is 1.5rate. Phyton says that I have a mistake here: return 40rate +(hrs-40)rate1.5 but I cannot understand why. The programme:

def computepay(hrs,rate): if hrs <=40: return hrsrate else: return 40rate +(hrs-40)rate1.5

hrs = float(input("Enter Hours:")) tarifa = float(input("Enter rate:")) computepay(hrs, rate) print("Pay", computepay(hrs,rate)

What is the error message you get for that line?