Created
October 1, 2017 06:21
-
-
Save anonymous/f5b1de1d95b59d2eafc762f0df92fc4e to your computer and use it in GitHub Desktop.
Kamen_nuzky
This file contains hidden or 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
from random import randrange | |
cislo = randrange(3) | |
print(cislo) | |
if cislo == 0: | |
tah_pocitace= "kámen" | |
elif cislo == 1: | |
tah_pocitace = "nůžky" | |
else: | |
tah_pocitace = "papír" | |
tah_cloveka = input('kámen, nůžky, nebo papír? ') | |
#plichta | |
if tah_cloveka == tah_pocitace: | |
print ("Plichta") | |
#počítač vyhrál | |
if tah_pocitace == "kámen" and tah_cloveka == "nůžky": | |
print ("Počítač vyhrál") | |
elif tah_pocitace == "nůžky" and tah_cloveka == "papír": | |
print ("Počítač vyhrál") | |
elif tah_pocitace == "papír" and tah_cloveka == "kámen": | |
print ("Počítač vyhrál") | |
# člověk vyhrál | |
if tah_cloveka == "kámen" and tah_pocitace == "nůžky": | |
print ("Vyhrál jsi") | |
elif tah_cloveka == "nůžky" and tah_pocitace == "papír": | |
print ("Vyhrál jsi") | |
elif tah_cloveka == "papír" and tah_pocitace == "kámen": | |
print ("Vyhrál jsi") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment