Commit 5f57f2b2 by BellCodeEditor

save project

parent 8ee671b3
Showing with 8 additions and 2 deletions
...@@ -3,4 +3,10 @@ xxx=input("出拳:") ...@@ -3,4 +3,10 @@ xxx=input("出拳:")
print("玩家出拳是:"+xxx) print("玩家出拳是:"+xxx)
x=["剪刀","石头","布"] x=["剪刀","石头","布"]
xx=random.choice(x) xx=random.choice(x)
print(xx) print(xx)
\ No newline at end of file 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