This commit is contained in:
madmaurice 2015-06-07 15:15:48 +02:00
parent 598d470eec
commit a0fb2c8bfd

9
rps.py Normal file
View file

@ -0,0 +1,9 @@
#!/usr/bin/env python3
t = ["rock","paper","scissors"]
w = ["draw","win","lose"]
p = lambda you,enemy: w[ t.index(you)-t.index(enemy)]
if __name__ == "__main__":
from sys import argv
print(p(argv[1],argv[2]))