Commit 057f02c8 by BellCodeEditor

save project

parent 1a7ccde8
Showing with 6 additions and 5 deletions
...@@ -4,11 +4,12 @@ import random ...@@ -4,11 +4,12 @@ import random
kk=["剪刀","石头","布"] kk=["剪刀","石头","布"]
jj=random.choice(kk) jj=random.choice(kk)
print("计算机:"+jj) print("计算机:"+jj)
if hh==("剪刀""石头""布"):
if hh==jj: if hh==jj:
print("平局") print("平局")
elif hh=="石头"and jj=="剪刀" or hh=="剪刀" and jj=="布" or hh=="布"and jj=="石头": elif hh=="石头"and jj=="剪刀" or hh=="剪刀" and jj=="布" or hh=="布"and jj=="石头":
print("你赢了") print("你赢了")
else: else:
print("你输了") print("你输了")
else:
print("输入错误")
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment