Commit c55a8965 by BellCodeEditor

save project

parent cb7a854b
Showing with 10 additions and 6 deletions
...@@ -5,14 +5,17 @@ kj=random.choice(["石头","剪刀","布"]) ...@@ -5,14 +5,17 @@ kj=random.choice(["石头","剪刀","布"])
print(kj) print(kj)
com=["石头","剪刀","布"] com=["石头","剪刀","布"]
coms=random.choice(com) coms=random.choice(com)
print("计算机出拳":"+coms) print("计算机出拳:"+coms)
if coms==play: if player in com:
if coms==player:
print("平局") print("平局")
elif play=="石头"and coms=="剪刀": elif player=="石头"and coms=="剪刀":
print("赢了") print("赢了")
elif play=="剪刀"and coms=="": elif player=="剪刀"and coms=="布":
print("赢了") print("赢了")
elif play==""and coms=="石头": elif player=="布"and coms=="石头":
print("赢了") print("赢了")
else: else:
print("输了") print("输了")
else:
print("你输入的什么鬼")
\ No newline at end of file
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