Commit 5f57f2b2 by BellCodeEditor

save project

parent 8ee671b3
Showing with 7 additions and 0 deletions
...@@ -4,3 +4,9 @@ print("玩家出拳是:"+xxx) ...@@ -4,3 +4,9 @@ print("玩家出拳是:"+xxx)
x=["剪刀","石头","布"] x=["剪刀","石头","布"]
xx=random.choice(x) xx=random.choice(x)
print(xx) print(xx)
if xxx==xx:
print("平局")
elif (xxx=="石头"and xx=="剪刀") or (xxx=="剪刀"and xx=="布") or (xxx=="布"and xx=="石头") :
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