Commit d2de42a0 by BellCodeEditor

save project

parent b98e7016
Showing with 10 additions and 6 deletions
......@@ -9,9 +9,13 @@ computer=random.choice(list)
print("电脑出拳:"+computer)
#结果比较
if (computer=="石头" and player=="剪刀") or (computer=="剪刀" and player=="布") or (computer=="布" and player=="石头"):
print("电脑获胜")
elif (player=="石头" and computer=="剪刀") or (player=="剪刀" and computer=="布") or (player=="布" and computer=="石头"):
print("玩家获胜")
else:
print("平局")
if player in list:
print("输入正确")
if (computer=="石头" and player=="剪刀") or (computer=="剪刀" and player=="布") or (computer=="布" and player=="石头"):
print("电脑获胜")
elif (player=="石头" and computer=="剪刀") or (player=="剪刀" and computer=="布") or (player=="布" and computer=="石头"):
print("玩家获胜")
else:
print("平局")
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