Basic indentation - Python
Question: 
    #RockPS
    import random
    
    Choices=['R','P','S']
    UserScore=0
    CpuScore=0
    Games=0
    
    while Games<6:
        UserChoice=input('Rock, paper or scissors? (Type R, P or S respectively)')
        if UserChoice in Choices:
            Games+=1
    CpuChoice = random.choice(Choices)   
    
    if UserChoice == 'S' and CpuChoice == 'P':
        UserScore+=1
    if UserChoice == 'P' and CpuChoice == 'R':
        UserScore+=1
    if UserChoice == 'R' and CpuChoice == 'S':
        UserScore+=1
    if UserChoice == 'S' and CpuChoice == 'R':
        CpuScore+=1
    if UserChoice == 'P' and CpuChoice == 'S':
        CpuScore+=1
    if UserChoice == 'R' and CpuChoice == 'P':
        CpuScore+=1
    
    print(UserScore, CpuScore)
    if UserScore>CpuScore:
        print('Well done, you won!')
    if UserScore==CpuScore:
        print('You tied!')
    if UserScore<CpuScore:
        ('Unlucky, you lost.')
    

I'm new to Python so it's likely I've missed something obvious. The program
runs fine. It's a Rock, Paper or Scissors game. 5 games are played and the
scores are listed at the end of the game. At the moment, it only says 1 0, 0
0, or 0 1 either way, only counting 1 game. I'm not sure why this is. I think
that it is to do with my indentation as I don't see a problem with my loop.


Answer: Here's what's going on: this part of your code

    
    
    while Games<6:
        UserChoice=input('Rock, paper or scissors? (Type R, P or S respectively)')
        if UserChoice in Choices:
            Games+=1
    

executes 6 times, but all the remaining lines from here down:

    
    
    CpuChoice = random.choice(Choices)   
    
    if UserChoice == 'S' and CpuChoice == 'P':
        UserScore+=1
    if UserChoice == 'P' and CpuChoice == 'R':
        UserScore+=1
    

only execute once, after the loop iterations are complete. All of the `if
UserChoice ==` lines should be indented so that they are part of the loop
body.

