I'm building this rock, paper, scissors game and I've gotten quite far. However, I can't get the final scores to print correctly. No matter the situation, I always get 0 value on total rounds, total wins and ties.
I've been trying to add to these variables within the loop, however, I just cannot seem to figure this out.
import random
# a rock, paper, scissors game
loop = True
while loop is True:
win = 0
tie = 0
lose = 0
rounds = 0
usrchoice = input("Rock, Paper or Scissors? (Quit ends): ") # user makes a choice
if usrchoice.title() == "Rock":
pass
...
if computer_choice == "Scissors":
print("You WIN!")
win = win + 1
rounds = rounds + 1
elif computer_choice == "Rock":
print("It's a tie!")
tie = tie + 1
rounds = rounds + 1
else:
print("You LOSE!")
lose = lose + 1
rounds = rounds + 1
I expect the output to be anything, depending on the user of course, and not just 0. Like this:
>>> You played 0, and won 0 rounds, playing tie in 0 rounds.