Commit 624a3869 by BellCodeEditor

save project

parent 089e937c
Showing with 11 additions and 7 deletions
......@@ -4,12 +4,16 @@ print("玩家出拳:"+player)
list=["石头","剪刀","布"]
computer=random.choice(list)
print("请计算机:"+computer)
if player==computer:
print("平局")
elif player=="石头" and computer=="剪刀":
print("玩家嬴了!")
elif player=="剪刀" and computer=="布":
if player in list:
if player==computer:
print("平局")
elif player=="石头" and computer=="剪刀":
print("玩家嬴了!")
elif player=="剪刀" and computer=="布":
print("玩家嬴了!")
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