Commit 17f23f9d by BellCodeEditor

save project

parent 5bdcedc1
Showing with 11 additions and 6 deletions
...@@ -3,11 +3,15 @@ print("玩家出:"+p) ...@@ -3,11 +3,15 @@ print("玩家出:"+p)
import random import random
d=['石头',"剪刀","布"] d=['石头',"剪刀","布"]
d=random.choice(d) d=random.choice(d)
print("电脑出"+d) print("电脑出"+d)
if (P=d) if (p==d):
prind("平局") prind("平局")
elif (P=="剪刀" and d=="布") or p=="石头” or d=="剪刀" elif (p=="剪刀" and d=="布") or p=="石头" and d=="剪刀":
print("我赢了") print("我赢了")
eise: else:
print("电脑赢") 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