rock paper scissor
this code get user input of two player how many times they can use paper , rock , scissor and in output I should output what is the maximum score for second one. per time he wins get one score and per time he lose , he will lose one score. why doesn't this code work? numbers = [int(i) for i in input('').split(' ')] def shingedbow(): for i in range(numbers[0]): return "paper" for i in range(numbers[1]): return "rock" for i in range(numbers[2]): return "scissor" def friend(): for i in range(numbers[5]): return "scissor" for i in range(numbers[3]): return "paper" for i in range(numbers[4]): return "rock" n = sum(numbers[0:3]) results1 = [] results2 =[] counter = 0 for i in range(n): results1.append(shingedbow()) results2.append(friend()) def check_rps(a,b): if (a=="rock" and b=="scissor") or (a=="scissor" and b=="paper") or (a=="paper" and b=="rock"): return 1 elif (b=="rock" and a=="scissor") or (b=="scissor" and a=="paper") or (b=="paper" and a=="rock"): return 2 elif (a=="rock" and b=="rock") or (a=="scissor" and b=="scissor") or (a=="paper" and b=="paper"): return 3 return counter #def travers(): counter = 0 for i in results1: check_answer=(check_rps(i,results2[results1.index(i)])) #print(check_answer) if check_answer==1: counter-=1 elif check_answer==2: counter+=1 elif check_answer==3: counter+=0 print(counter)