Commit e763f3b3 by BellCodeEditor

save project

parent 74a212ca
Showing with 6 additions and 0 deletions
...@@ -4,3 +4,9 @@ import random ...@@ -4,3 +4,9 @@ import random
list=["剪刀","石头","布"] list=["剪刀","石头","布"]
letter=random.choice(list) letter=random.choice(list)
print("计算机出拳:"+letter) print("计算机出拳:"+letter)
if player==random:
print("平局")
elif ("剪刀"==letter and player=="石头") or ("石头"==letter and player=="布") or ("布"==letter and player=="剪刀"):
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