Created
May 14, 2015 06:46
-
-
Save macrat/a2398d15f049fe288ce1 to your computer and use it in GitHub Desktop.
pythonでもやっぱり一行でじゃんけんをしようかと思ったのでした。EOFErrorには勝てなかったよ。
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(lambda hands : (lambda usr, cpu: print('usr: {0}\ncpu: {1}\n{2}'.format(hands[int(usr)], hands[cpu], ('drow :-)', 'lose...', 'your win!!')[(3+int(usr)-cpu)%3]) if usr.isdigit() and 0 <= int(usr) <= 2 else 'incorrect input!'))(input('jan! ken!! game!!!\nplease your hand(0:{0}, 1:{1}, 2:{2}):'.format(*hands)), __import__('random').randint(0, 2)))(('guu', 'choki', 'paa')) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment