Commit c55a8965 by BellCodeEditor

save project

parent cb7a854b
Showing with 14 additions and 11 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:
print("平局") if coms==player:
elif play=="石头"and coms=="剪刀": print("平局")
print("赢了") elif player=="石头"and coms=="剪刀":
elif play=="剪刀"and coms=="": print("赢了")
print("赢了") elif player=="剪刀"and coms=="布":
elif play==""and coms=="石头": print("赢了")
print("赢了") elif player=="布"and coms=="石头":
print("赢了")
else:
print("输了")
else: else:
print("输了") print("你输入的什么鬼")
\ No newline at end of file \ 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