Commit 918014ed by BellCodeEditor

save project

parent 56255beb
Showing with 12 additions and 9 deletions
......@@ -6,13 +6,16 @@ list=["剪刀","石头","布"]
d=random.choice(list)
print("机器出",d)
print("玩家出",s)
if s=d:
print("平局")
elif s=="石头" and d=="剪刀":
print("玩家赢")
elif s=="石头" and d=="剪刀":
print("玩家赢")
elif s=="剪刀" and d=="布":
print("玩家赢")
if s in list:
if s=d:
print("平局")
elif s=="石头" and d=="剪刀":
print("玩家赢")
elif s=="石头" and d=="剪刀":
print("玩家赢")
elif s=="剪刀" and d=="布":
print("玩家赢")
else:
print("机器赢")
else:
print("机器赢")
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