Write a program that asks the user for their hourly pay and the number of hours
ID: 3762599 • Letter: W
Question
Write a program that asks the user for their hourly pay and the number of hours worked for a week. Determine their gross pay assuming that they make 1.5 overtime pay (i.e. they get overtime, 1.5 times as much per hour for any time worked over 40). Sample output is below from two different runs, with yellow highlights denoting user input: What is your hourly pay: 10, How many hours did you work: 50 You made $550, with 10 hours of overtimeExplanation / Answer
n = int(input("What is your hourly pay: ")) m = int(input("How many hours did you work: ")) if(m>=40): ans = (m-40)*n*1.5+40*n print("You made $"+str(ans)+", with "+str(m-40)+" hours of overtime") else: ans = n*m print("You made $"+str(ans)+" with no overtime")