Rock, Paper Scissor game (console-based) in Python
It looks like you are familiar with dictionaries and maybe lists. So, let's look at how you collect and enter input. It looks like you are trying to control erroneous input with your try/except and if statement. There is some trouble though. I can send a float through your code if it has a value like 1.2 or 2.5. Your code will turn it into an int and then try to use the value, but there's another way to handle something like this:

if choice not in ['1','2','3']:
    raise ValueError
else:
    break


So, in this case, I'm using a list of the only acceptable values, checking if the choice is in there, and then moving forward.

Your control flow looks a little messy. There are a couple of ways to handle this.

If we keep the same general approach, you can make it more readable by spreading it out. I would actually make a new function for this:

def compare(x,y):
    if x == y:
        state = "It's a Draw!"
    if x == '1':
        if y == '2':
            state = "You Lose!"
        else:
            state == "You Win!"
    elif x == '2':
        if y == '1':
            state = "You Win!"
        else:
            state == "You Lose!"
    else:
        if y == '1':
            state = "You Lose!"
        elif y == '2':
            state = "You Win!"
    return state


However, depending on how comfortable you are with lists, there is another, simpler way!

You can setup a list of the possible game conditions and then do whatever you want to them:

game_result = ["tie!", "win!", "lose!"]


(Actually, that sequence in the list was coded for 1) Rock, 2)Paper, and 3)Scissors. There should be another arrangement for rock-scissors-paper though that makes things smooth).

Then define a comparison function that just looks at the modulated difference between the user and robot input (you'll need to convert them to the int data type first).

def compare(x,y):
result = game_result[ (x-y)%3 ]
return result


There's a few tricky things with how you're checking which round you should be on. So, first thing, it might be helpful/more readable if you change the variable name to something useful like round_number or matches_left.

Then, you have it set to end the while loop if the round number is not equal to n. There's another potential bug here. What if the user enters a float or something you don't want? -- Actually, you're using int() on the input, which corrects for this. So good call! But, that design pattern doesn't always carry over well and it may not be as clear to other readers ( it wasn't to me anyways).

Suppose the player enters 1.2, then your while loop goes on for ever if you aren't using int(). One way to handle this is to use try/except; another way is to use isinstance; and another way is to do something like this:

while num_of_rounds &lt;= ngames:
        game()
        num_of_rounds += 1


In this way, you cover a broader set of what is acceptable/unacceptable and don't have your code hinging on a small window of operation (and exploitability).

Overall, your code works and was fun to play! The biggest things are style, readability, and different ideas on how to handle incorrect input. I would check out the PEP 8 Python style Guide for some general insights: https://www.python.org/dev/peps/pep-0008/