Commit 2c2db7b7 by BellCodeEditor

save project

parent 6be82375
Showing with 17 additions and 14 deletions
......@@ -5,17 +5,20 @@ p=input("你出什么?")
print("玩家出:"+p)
t=random.choice(list)
print("电脑出:"+t)
if p==t:
print("平局")
elif p=="石头" and t=="剪刀":
print("玩家win")
elif p=="剪刀" and t=="布":
print("玩家win")
elif p=="布" and p=="石头":
print("玩家win")
elif t=="石头" and p=="剪刀":
if p in list:
if p==t:
print("平局")
elif p=="石头" and t=="剪刀":
print("玩家win")
elif p=="剪刀" and t=="布":
print("玩家win")
elif p=="布" and p=="石头":
print("玩家win")
elif t=="石头" and p=="剪刀":
print("电脑win")
elif t=="剪刀" and p=="布":
print("电脑win")
elif t=="剪刀" and p=="布":
print("电脑win")
elif t=="布" and p=="石头":
print("电脑win")
\ No newline at end of file
else:
print("电脑win")
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