Problem with a rock, paper, scissors game in Python
<p>I'm currently coding a little rock, paper, scissors game in Python, however I appear to have stumbled upon a problem. The game works, even though the code is a little rough, but I've tried to make the program inform the player they have made an error, and when I test this out, it randomly informs the player they have made an error, when they have not. Here is the block of code that is my problem, it is not the whole game.</p>

<pre><code>def game(self):

    print "This is rock, paper, scissors!"

    rps = ('rock', 'paper', 'scissors')

    comp1 = raw_input("Rock, paper or scissors?\n&gt; ")
    comp2 = random.choice(rps)

    if comp1 == 'rock' and comp2 == 'scissors' or comp1 == 'scissors' and comp2 == 'paper' or comp1 == 'paper' and comp2 == 'rock':
        print "You won! The computer chose %s" % comp2
        return "game"
    elif comp1 == 'rock' and comp2 == 'rock':
        print "In a stalemate, there are no winners, only losers :)\nThe computer also chose %s" % comp2
        return "game"
    elif comp1 == 'scissors' and comp2 == 'scissors':
        print "In a stalemate, there are no winners, only losers :)\nThe computer also chose %s" % comp2
        return "game"
    elif comp1 == 'paper' and comp2 == 'paper':
        print "In a stalemate, there are no winners, only losers :)\nThe computer also chose %s" % comp2
        return "game"
    elif comp1 != 'rock' or 'scissors' or 'paper':
        print "Try choosing between rock, paper and scissors next time. It might help.
        return "game"
    else:
        print "The computer %s. You have failed. Problem?" % comp2
        return "game"
</code></pre>
