Skip to content

Instantly share code, notes, and snippets.

@asafshkalim
asafshkalim / rockpaperscissors.py
Created January 31, 2019 20:30
Rock Paper Scissors game (Python)
human_score = 0
computer_score = 0
def choice_to_number(x):
return {'rock':1,'paper':2,'scissors':3}[x]
#print(mydict[name])
def random_choice():
import random
return random.choice(['rock','paper','scissors'])