Jan-07-2019, 12:12 PM
Yes sorry micseydel is right, I overread that part. rate should be an input as well
The correct code is:
The correct code is:
hours = float(input("Enter hours: ")) rate = float(input("Enter rate per hour: ")) ratePlus = rate * 1.5 if hours > 40: pay = 40 * rate + (hours - 40) * ratePlus else: pay = hours * rate print (pay)