Answer:
The code is shown below:
Step-by-step explanation:
Consider the provided information.
The required code is shown below:
hrs = input("Enter the number of hours worked this week: ")
h = float(hrs)
if h<0:
print("Error")
elif h>70:
print("Error")
else:
xx= input("Enter the hourly rate pay: ")
x=float(xx)
if h<= 35:
print(h * x)
elif h > 35:
print(35* x + (h-35)*1.5*x)
For better understanding refer to the image shown below.