Uploaded by Annika Pie

RPS

advertisement
Rock, Paper, Scissors Game
import random
def main():
userChoice = input("r,p or s?")
computerChoice = generateComputerChoice()
if userChoice != "r" and userChoice != "p" and userChoice !="s":
return "Error"
else:
result = determineWinner(userChoice,computerChoice)
if result == "user":
print("You Won!")
return "user"
elif result == "computer":
print("Too bad, you lost.")
return "computer"
else:
print("It's a tie!")
return "tie"
Download