Hi,
I am trying to complete the PY4E course and I am having trouble figuring out the correct code.
I got a TypeError ‘<=’ not supported between instances of ‘str’ and ‘int’ on line 6
THIS IS THE CODE
- hrs = input(“Enter Hours”)
- rat = input(“Enter Rate”)
- reg = 40
- ovt = 1.5
- check = float(hrs) * float(rat)
- if hrs <= 40 :
-
print(check) - print(check)
- ovtpay = (float(hrs) - float(reg)) * (float(rat) * float(ovt))
- if hrs > 40 :
-
print(ovtpay)
12.print(ovtpay)