Created
October 5, 2018 12:09
-
-
Save gorn/350bd179324ce35d4bac2e778e2816e9 to your computer and use it in GitHub Desktop.
Twitter Kámen Nůžky Papír
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
#Muj pokus | |
from random import choice | |
p={'K':'P', 'N':'K', 'P':'N'} | |
h=['K', 'N', 'P'] | |
while True: | |
a=input('\nK/N/P?: ') | |
if a in h: | |
b = choice(h) | |
print(b,'-> ',end= ' ') | |
if p[b] == a:print('vyhrals') | |
elif p[a] == b:print('prohra') | |
else: print('remis') | |
else: print('neplatne', a) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment