Rock, Paper, Scissors doesn't let user win
<pre><code>#RoShamBo
import random
count=0
while count&lt;2 and count&gt; -2:
    compnum=random.randint(0,2)
    usernum=int(input("Scissor(0), Rock(1), Paper(2)"))
    if compnum==0:
        if usernum==0:
            print("Draw")
        elif usernum==1:
            print("Win")
            count=count+1
        elif usernum==2:
            print("Lose")
            count=count-1
    elif compnum==1:
        if usernum==0:
            print("Lose")
            count=count-1
        elif usernum==1:
            print("Draw")
        elif usernum==2:
            print("Win")
            count=count+1
    elif compnum==2:
        if usernum==0:
            print("Win")
            count=count+1
        elif usernum==1:
            print("Lose")
            count=count-1
        elif usernum==2:
            print("Draw")
if count&gt;2:
    print("You won more than 2 times")
else:
    print("The computer won more than 2 times")
</code></pre>

<p>The output is messed up -- for one thing, it won't let the user win. Also, it's not calculating the numbers properly. This was a lab assignment for a class in introduction to Python, but the professor I believe wrote the code incorrectly. Here's a sample broken output: </p>

<pre><code>============== RESTART: C:/Users/FieryAssElsa/Desktop/Broken.py ==============
    Scissor(0), Rock(1), Paper(2)2
    Draw
    Scissor(0), Rock(1), Paper(2)2
    Win
    Scissor(0), Rock(1), Paper(2)2
    Draw
    Scissor(0), Rock(1), Paper(2)2
    Lose
    Scissor(0), Rock(1), Paper(2)2
    Win
    Scissor(0), Rock(1), Paper(2)2
    Win
    The computer won more than 2 times
</code></pre>

<p>You can try it with <code>if count==2:</code></p>

python while-loop