Author | Corey White |
Submission date | 2011-06-09 22:01:52.490061 |
Rating | 5220 |
Matches played | 5569 |
Win rate | 50.55 |
Use rpsrunner.py to play unranked matches on your computer.
import random
def randPlay():
return random.choice(["R","P","S"])
def beats(x):
if x == "R":
return "P"
elif x == "P":
return "S"
elif x == "S":
return "R"
else:
return randPlay()
output = randPlay()