Commit 4ea24489 by BellCodeEditor

save project

parent 17de0f64
Showing with 12 additions and 9 deletions
......@@ -5,13 +5,16 @@ import random
list=["石头","剪刀","布"]
awa=random.choice(list)
print(awa)
if s==awa:
print("平局")
elif s=="石头"and awa=="剪刀":
print("玩家胜")
elif s=="剪刀"and awa=="布":
print("玩家胜")
elif s=="布"and awa=="石头":
print("玩家胜")
if s in list:
if s==awa:
print("平局")
elif s=="石头"and awa=="剪刀":
print("玩家胜")
elif s=="剪刀"and awa=="布":
print("玩家胜")
elif s=="布"and awa=="石头":
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