Commit 10394920 by BellCodeEditor

save project

parent 6e1155c1
Showing with 12 additions and 2 deletions
...@@ -5,4 +5,14 @@ ...@@ -5,4 +5,14 @@
import random import random
a=["石头","剪刀","布"] a=["石头","剪刀","布"]
dn=random.choice(a) dn=random.choice(a)
print(dn) print(dn)
\ No newline at end of file if player in list:
if player==dn:
print("平局")
else(player=="石头"and dn=="剪刀") or (player=="剪刀"and dn=="布") or(player=="布"and dn=="石头")
print(获胜)
else:
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