# play rock, s, p game

# get the random functions
import random

# let computer choose a random number
# 1: rock, 2: scissor, and 3: paper
number = random.randrange(1,4)

# let user pick
user = raw_input("choose rock (r), scissors(s) or paper(p)")


print "your input is", user

if user=="r" or user=="s" or user=="p": # check if it is an allowed input
    if number==1: # computer is rock
        print "computer's input is r"
        if user == "r":
            print "tie!"
        elif user =="s":
            print "You lose!"
        elif user =="p":
            print "you win!"
        else: # this should not happen
            print "something is wrong here"
    elif number ==2: #computer is scissor
        print "computer's input is s"
        if user == "s":
            print "tie!"
        elif user =="p":
            print "You lose!"
        elif user =="r":
            print "you win!"
        else: # this should not happen
            print "something is wrong here"
    elif number ==3: # computer is paper
        print "computer's input is p"
        if user == "p":
            print "tie!"
        elif user =="r":
            print "You lose!"
        elif user =="s":
            print "you win!"
        else: # this should not happen
            print "something is wrong here"
else: # not a valid input
    print "not an allowed answer! "

raw_input("press enter to exit.")

