Commit f65a9fb4 by BellCodeEditor

save project

parent 05ba043e
Showing with 7 additions and 0 deletions
...@@ -4,3 +4,9 @@ print("玩家出拳:"+p) ...@@ -4,3 +4,9 @@ print("玩家出拳:"+p)
w=["石头","剪刀","布"] w=["石头","剪刀","布"]
e=random.choice(w) e=random.choice(w)
print("电脑出拳:"+e) print("电脑出拳:"+e)
if p==e:
print("平局")
elif p=="石头" and e=="剪刀" or p=="布" and e=="石头" or p=="剪刀" and e=="布":
print("玩家赢")
else:
print("玩家输")
\ No newline at end of file
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