if statements not executing
<p>New to the language and this rock paper scissors thing is the first thing I've ever done in python so im aware the code is inefficient and nooby but any pointers will be appreciated! Basically im getting a response as if none of the if statements are being executed and found = False is staying as such throughout the whole program! So the output is "You drew with your opponent" even when I know from debugging that MyChoice and aiChoice are valid and not drawing.</p>

<pre><code>import time as t
import random as r
import os

os.system('@Color 0a')

aiWins = 0
MyWins = 0

Rock = 1
Paper = 2
Scissors = 3
found = False

#welcome text
print("\nWelcome to rock paper scissors")
t.sleep(1)
print("\nPlease enter a username")
user = input("&gt; ")

def aiCheck(aiWins):
    if aiWins &gt; 5:
        print("Unfortunately the computer has bested you this time! Try again.")

def myCheck(MyWins):
    if MyWins &gt; 5:
        print("Congratulations you have won the game!")

def whowon(found, MyChoice, aiChoice, myWins, aiWins):
    print (MyChoice)
    print (aiChoice)    
    if MyChoice == 1 and aiChoice == 3:
        found = True
        t.sleep(2)
        print('You chose rock and your opponent chose scissors! You win!')
        MyWins = MyWins + 1
    elif MyChoice == 2 and aiChoice == 1:
        found = True
        t.sleep(2)
        print('You chose paper and your opponent chose rock! You win!')
        MyWins = MyWins + 1
    elif MyChoice == 3 and aiChoice == 2:
        found = True
        t.sleep(2)
        print ('You chose scissors and your opponent chose paper! You win!')
        MyWins = MyWins + 1
    elif MyChoice == 3 and aiChoice == 1:
        found = True
        t.sleep(2)
        print('You chose scissors and your opponent chose rock! You lose!')
        aiWins = aiWins + 1
    elif MyChoice == 1 and aiChoice == 2:
        found = True
        t.sleep(2)
        print('You chose rock and your opponent chose paper! You lose!')
        aiWins = aiWins + 1
    elif MyChoice == 2 and aiChoice == 3:
        found = True
        t.sleep(2)
        print ('You chose paper and your opponent chose scissors! You lose!')
        aiWins = aiWins + 1
    if found == False:
        print("You drew with your opponent")
    return found
    return MyWins
    return aiWins

print("\nOptions!")
t.sleep(1)
print('\n1. Rock')
print('2. Paper')
print('3. Scissors')
print('\nEnter the number that correlates with your choice')
MyChoice = input('&gt; ')
aiChoice = r.randint(1,3)

whowon(found, MyChoice, aiChoice, MyWins, aiWins)
</code></pre>

<p>Firstly, these are already global variables. No need to use them as parameters. </p>

<pre><code>aiWins = 0
MyWins = 0
found = False
</code></pre>

<p>Now, you can define the method like so and use the <code>global</code> keyword to ensure you're using those global variables. </p>

<pre><code>def whowon(MyChoice, aiChoice):
    global aiWins
    global MyWins
    global found

    print (MyChoice)
    print (aiChoice)  
    # etc... 
</code></pre>

<p>Then, those return statements aren't really needed. Plus any function ends at the first return statement anyway. </p>

<p>Lastly, <code>input()</code> returns a string, so your if statements are comparing integers to strings, which is false, therefore they are executing as intended. </p>

<p>To fix the problem, you need to cast the input to an integer before you compare. You can either do that directly on the input method</p>

<pre><code>MyChoice = int(input("&gt; "))
</code></pre>

<p>Or directly on the parameter </p>

<pre><code>whowon(int(MyChoice), aiChoice)
</code></pre>

<p>Or on each of the variables in the if statements within the function. Up to you </p>

python python-3.x