Commit 8bfcffbf by BellCodeEditor

save project

parent c37f120a
Showing with 6 additions and 6 deletions
import random
# 玩家出拳
player=input("请出拳(石头;剪刀;布)")
print("玩家出拳:"+player)
list = ["剪刀","石头","布"]
if player in list:
while True:
player=input("请出拳(石头;剪刀;布)")
print("玩家出拳:"+player)
list = ["剪刀","石头","布"]
if player in list:
cmp=random.choice(list)
print("电脑出拳"+cmp)
if player==cmp:
......@@ -13,5 +13,5 @@ if player in list:
print("win")
else:
print("lose")
else:
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