My1stPythonProgram

AuthorCarsten Drossel
Submission date2011-06-16 14:32:33.164261
Rating4868
Matches played5401
Win rate42.64

Use rpsrunner.py to play unranked matches on your computer.

Source code:

import random
if input == "":
  output = random.choice(["R","P","S"])
else:
  tobeat = input[random.randint(0, len(input)-1)]
  if tobeat == "R":
	output = "P"
  elif tobeat == "P":
	output = "S"
  elif tobeat == "S":
	output = "R"