Commit b1544272 by BellCodeEditor

save project

parent 17d4421e
Showing with 10 additions and 0 deletions
...@@ -5,3 +5,13 @@ import random ...@@ -5,3 +5,13 @@ import random
list=["石头","剪刀","布"] list=["石头","剪刀","布"]
b=random.choice(list) b=random.choice(list)
print("电脑:"+b) print("电脑:"+b)
if b==play:
print("平局")
elif b=="剪刀"and play=="石头"
print("赢了")
elif b=="石头"and play=="布"
print("赢了")
elif b=="布"and play=="剪刀"
print("赢了")
else:
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