def main(): hours = int(input('enter hours worked this week ')) while hours < 0 or hours > 40: print("Hours must be a number from 0 to 40") hours = int(input('enter hours worked this week ')) rate = float(input('enter hourly pay rate ')) while rate <= 15.50 or rate > 100: # Print a different message, depending on what # is wrong if rate <= 15.50: print("the minimum rate is 15.50") elif rate > 100: print("the maximum rate is 100") rate = float(input('enter hourly pay rate ')) grossPay = hours * rate print("Gross pay: $",format(grossPay,',.2f'),sep="") main()