[![enter image description here](https://i.stack.imgur.com/GXLqP.png)](https://i.stack.imgur.com/GXLqP.png)

This is a python code for Rock Paper Scissor game, played by the user and computer. The score of the user is the variable and the score of the computer is computer\_score which are incremented if the conditions fulfilled. The incrementation is not working as player1\_score remains 0 even after winning and computer\_score is incrementing every five times the loop runs, even when it is losing.
Here is the whole code:

```
import random

hand = ["R","P","S"]

def game():

    player1_score = 0
    computer_score = 0

    i=0
    while (i<5):
        print("Enter R for ROCK \nEnter P for PAPER\nEnter S for SCISOR")
        your_hand = input(player1 + " picks: ").upper()
        if your_hand not in hand:
            continue
        computer_hand = random.randint(0,2)
        print("Computer picks: ", hand[computer_hand])
        if your_hand == "R" and computer_hand == "S":
            player1_score += 1 
            print("Your score: ",str(player1_score) + "\n My score: ", str(computer_score))
        elif your_hand == "P" and computer_hand == "R":
            player1_score += 1
            print("Your score: ",str(player1_score) + "\n My score: ", str(computer_score))
        elif your_hand == "S" and computer_hand == "P":
            player1_score += 1
            print("Your score: ",str(player1_score) + "\n My score: ", str(computer_score))
        else:
            computer_score += 1
            print("Your score: ",str(player1_score) + "\n My score: ", str(computer_score))
        i += 1
    print("Your score: ",str(player1_score) + "\n My score: ", str(computer_score))   

print("\t\t\tWELCOME TO ROCK PAPER SCISORS!")

print("\t\t\tRemember this: \n\t\t\t\t SCISORS KILLS PAPER \n\t\t\t\t PAPER KILLS STONE \n\t\t\t\t STONE KILLS SCISORS")
player1 = input("Player 1 Enter your name: ")
print("Player 2: Hello! " + player1 +". I am your COMPUTER!")

print("SO SHALL WE : \n\t1. PLAY \n\t2. EXIT")
start = int(input("Enter the choice: "))
if start == 1:
   game()
else:
    exit()

```

Where should I make the change?