Commit c33cd443 by BellCodeEditor

save project

parent 07a14862
Showing with 8 additions and 0 deletions
...@@ -5,3 +5,11 @@ print("玩家出拳:"+s) ...@@ -5,3 +5,11 @@ print("玩家出拳:"+s)
p=["石头","布","剪刀"] p=["石头","布","剪刀"]
b=random.choice(p) b=random.choice(p)
print("电脑出拳"+b) print("电脑出拳"+b)
if s==b:
print("平局")
elif (s=="布" and b=="石头") or (s=="石头" and b=="剪刀") or (s=="剪刀" and b=="布"):
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