`'''I'm new in Python and I've just started Python 3.9, but I wrote the following Python code, but it doesn't work properly and it gives me the following error: (I apologize in advance for writing my own English grammar) unsupported operand type(s) for -: 'str' and 'str' The question is to calculate the hourly delay of 20 employees, which should be written with the function and class for 20 people, so that two random numbers from each of the 20 people in the two time slots of 12-12 and 17-13 are written with the random function, but except for Thursday, which is only between 8:00-13:00 should take a random input time slot. And then add up the time delay of each person in one week and print their delay and do it in order until the 20th person and for each person the delay of each person is printed as the number of days or hours of delay. I wrote the code, but the problem is that it gives a TypeError and says that these calculations are not possible for the string.'''
import random
c=0
def weeklyPaid(delays):
if delays >8:
return delays / 8
else:
return delays * 1
while c<=20:
sat1 = input(random.randint(8, 12))
sun1 = input(random.randint(8, 12))
mon1 = input(random.randint(8, 12))
tue1 = input(random.randint(8, 12))
wed1 = input(random.randint(8, 12))
thu1 = input(random.randint(8, 12))
sat2 = input(random.randint(13, 17))
sun2 = input(random.randint(13, 17))
mon2 = input(random.randint(13, 17))
tue2 = input(random.randint(13, 17))
wed2 = input(random.randint(13, 17))
thu2 = input(random.randint(13, 13))
delays = (sat2-sat1*1-8-1) + (sun2-sun1*1-8-1) +(mon2-mon1*1-8-1) + (tue2-tue1*1-8-1) + (wed2-wed1*1-8-1) + (thu2-thu1*1-8-1)
print("person delays","no",c+1, "=",delays)
c = c + 1