The function below is supposed to ask the user to enter a choice of rock paper or sciessors and output an error mesage if the user enters an invalid choice and then ouput a message if they won, drew or lost against the computer.
def rockPaperScissors():
import random
choice=raw_input("please enter your choice: ")
computerIndex = random.randint(1,3)
if computerIndex == 1:
computer = "rock"
elif computerIndex == 2:
computer = "scissors"
else:
computer = "paper"