Commit 9c169f33 by BellCodeEditor

save project

parent dbcef2c0
Showing with 5 additions and 0 deletions
...@@ -5,3 +5,8 @@ import random ...@@ -5,3 +5,8 @@ import random
l=["石头","剪刀","布"] l=["石头","剪刀","布"]
b=random.choice(l) b=random.choice(l)
print("计算机出拳"+b) print("计算机出拳"+b)
if h==b:
print("平局")
elif h=="石头"and b=="剪刀" or h=="剪刀"and b=="布"or h=="布"and h=="石头":
print("胜利")
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