Commit e763f3b3 by BellCodeEditor

save project

parent 74a212ca
Showing with 7 additions and 2 deletions
...@@ -3,4 +3,10 @@ print("玩家出拳:"+player) ...@@ -3,4 +3,10 @@ print("玩家出拳:"+player)
import random import random
list=["剪刀","石头","布"] list=["剪刀","石头","布"]
letter=random.choice(list) letter=random.choice(list)
print("计算机出拳:"+letter) print("计算机出拳:"+letter)
\ No newline at end of file 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