If you need to input both the hours and rate from the user, you can do so like this:
hours = int(input('how many hours did you work? '))
rate = int(input('what is your hourly rate? '))
Then once you have those variables, you can start by calculating the overtime.
if hours > 40:
# anything over 40 hours earns the overtime rate
overtimeRate = 1.5 * rate
overtime = (hours-40) * overtimeRate
# the remaining 40 hours will earn the regular rate
hours = 40
else:
# if you didn't work over 40 hours, there is no overtime
overtime = 0
Then calculate the regular hours:
regular = hours * rate
Your total pay is regular + overtime
.