Commit aa0841a3 by BellCodeEditor

auto save

parent 9e19422b
Showing with 11 additions and 2 deletions
...@@ -4,4 +4,14 @@ print("玩家出拳:"+player) ...@@ -4,4 +4,14 @@ print("玩家出拳:"+player)
app = ["石头","剪刀","布"] app = ["石头","剪刀","布"]
computer = random.choice(app) computer = random.choice(app)
print("电脑出拳:" + computer) print("电脑出拳:" + computer)
if app if APP in player:
\ No newline at end of file if app == player:
print("平局")
elif (app = "石头" or player = "布"),(app = "布" or player = "剪刀"),(app = "剪刀" or player = "石头"):
print("电脑胜利")
else:
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