From fd2c3e0ca9f79b3fcd0312a144ff860cd786d65c Mon Sep 17 00:00:00 2001 From: BellCodeEditor <bellcode_dev@bell.ai> Date: Sat, 28 May 2022 16:16:27 +0800 Subject: [PATCH] save project --- ag.py | 2 +- diy1.py | 11 ++++++++++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/ag.py b/ag.py index 95e52b4..33e9d12 100644 --- a/ag.py +++ b/ag.py @@ -1,4 +1,4 @@ import random list=[] -computer=random.choice(list) +=random.choice(list) print(computer) \ No newline at end of file diff --git a/diy1.py b/diy1.py index 9544072..e8e74a0 100644 --- a/diy1.py +++ b/diy1.py @@ -1,2 +1,11 @@ player=input("请出拳:石头/剪刀/布")# 玩家出拳 -print("玩家出拳:"+player) \ No newline at end of file +print("玩家出拳:"+player) +if player==computer: + print("平局") +elif player=="石头" and computer"布": + print("恭喜,你赢了") +elif player=="布" and computer"石头": + print("恭喜,你赢了") +else: + print("很遗憾,你输了") + -- libgit2 0.25.0