Commit b1544272 by BellCodeEditor

save project

parent 17d4421e
Showing with 11 additions and 2 deletions
...@@ -4,4 +4,14 @@ print('玩家:'+play) ...@@ -4,4 +4,14 @@ print('玩家:'+play)
import random import random
list=["石头","剪刀","布"] list=["石头","剪刀","布"]
b=random.choice(list) b=random.choice(list)
print("电脑:"+b) print("电脑:"+b)
\ No newline at end of file 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