Rock Paper Scissors in Python I'm a beginner in Python and I've just finished a Rock, Paper, Scissors simulator in Python. It asks the user to enter paper, rock, or scissors and the program will generate a random number which will convert it to paper, rock or scissors. The program will then print the corresponding result. It also keeps tracks of wins/losses/ties until the user wants to stop playing then prints the prints the results back to the user.

import random as r
print("Welcome to my Rock-Paper-Scissor Game")
print("The rules are as follow:")
print("     Paper beats Rock")
print("     Rock beats Scissors")
print("     Scissors beat Paper")
print()
win=0
ties=0
loss=0
i=0
while i==0:
    while True:
        user=input("Do you pick Rock, Paper, or Scissors? ")
        if user not in ("Scissors","scissors","paper","Paper","Rock","rock"):
            print("Please enter Rock, Paper or Scissors. ")
            continue
        else:
            break
    computer=r.randint(1,3)
    if computer==1:
        computer="Paper"
    if computer==2:
        computer="Rock"
    if computer==3:
        computer="Scissors"
    if (user=="Paper" or user=="paper"):
        print("You choose paper")
        if computer=="Paper":
            print('\033[0;32m' + "It's a tie! The program also choose paper")
            ties=ties+1
        if computer=="Rock":
            print('\033[1;31m' + "You won! The program choose rock")
            win=win+1
        if computer=="Scissors":
            print('\033[1;36m' + "You lost! The program choose scissors")
            loss=loss+1

    if (user=="Rock" or user=="rock"):
        print("You choose Rock")
        if computer=="Rock":
            print('\033[0;32m' + "It's a tie! The program also choose rock")
            ties = ties + 1
        if computer=="Scissors":
            print('\033[1;31m' + "You won! The program choose scissors")
            win = win + 1
        if computer=="Paper":
            print('\33[1;36m' + "You lost! The program choose paper")
            loss = loss + 1

    if (user=="Scissors" or user=="scissors"):
        print("You choose Scissors")
        if computer=="Scissors":
            print('\033[0;32m' + "It's a tie! The program also choose scissors")
            ties = ties + 1
        if computer=="Paper":
            print('\033[1;31m' + "You won! The program choose paper")
            win = win + 1
        if computer=="Rock":
            print('\033[1;36m' + "You lost! The program choose rock")
            loss = loss + 1
    while True:
        question=input('\033[0;0m' + "Would you like to play again? ")
        if question not in ("Yes","yes","Y","y","no","No","n","N"):
            print('\033[;1m' + "Please only enter yes or no. ")
            continue
        else:
            break
    if question in ("Yes","y","Y","yes"):
        i=0
    if question in ("No","n","no","N"):
        i=1
print()
print("Your final results are as follows")
print("Number of wins:",win)
print("Number of ties:",ties)
print("Number of losses:",loss)
Yes/no handling
Don't repeat yourself or reinvent the wheel. There already exists a distutils.util.strtobool that does exactly what you're trying to accomplish:

Convert a string representation of truth to true (1) or false (0).
True values are y, yes, t, true, on and 1; false values are n, no, f, false, off and 0. Raises ValueError if val is anything else.

You can convert the string to lowercase beforehand. Since strtobool raises a ValueError, your yes/no handling can be written succinctly like so:
while True:
    try:
        question=input('\033[0;0m' + &quot;Would you like to play again? &quot;)
        i = not strtobool(question)
        break
    except ValueError:
        print('\033[;1m' + &quot;Please only enter yes or no. &quot;)

Notice that strtobool returns 1 for truthy values, yet for some reason you have i == 0 represent &quot;keep going&quot;, which is confusing. So I used not here, but I recommend either changing that or using proper bools here for readability.