rps
This commit is contained in:
parent
598d470eec
commit
a0fb2c8bfd
1 changed files with 9 additions and 0 deletions
9
rps.py
Normal file
9
rps.py
Normal 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]))
|
||||
|
Loading…
Reference in a new issue