Jan-06-2019, 06:24 PM
This should do the trick. Input 45 gives 498.75.
hours = float(input("Enter hours: ")) rate = 10.5 ratePlus = 10.5 * 1.5 if hours > 40: pay = 40 * rate + (hours - 40) * ratePlus else: pay = hours * rate print (pay)