testCopied2

AuthorTidyMaze
Submission date2018-08-26 15:10:12.997194
Rating3438
Matches played282
Win rate34.4

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

Source code:

def beating(symb):
    return {
        "R": "P",
        "P": "S",
        "S": "R"
    }.get(symb)

if input == "": # initialize variables for the first round
	rockCount = paperCount = scissorsCount = 0
elif input == "R":
	rockCount += 1
elif input == "P":
	paperCount += 1
elif input == "S":
	scissorsCount += 1
if rockCount > paperCount and rockCount > scissorsCount:
	output = beating("R")
elif paperCount > scissorsCount:
	output = beating("P")
else:
	output = beating("S")