From ff196ae52ae55fcc1e6e90cc551506e1e3e3004d Mon Sep 17 00:00:00 2001 From: BellCodeEditor <bellcode_dev@bell.ai> Date: Sat, 19 Dec 2020 15:31:54 +0800 Subject: [PATCH] save project --- diy1.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/diy1.py b/diy1.py index 71de43b..9dbc4f6 100644 --- a/diy1.py +++ b/diy1.py @@ -1,13 +1,14 @@ # 玩家出拳 import random -print(input("玩家出拳")) +player = input("玩家出拳") +print("玩家出",player) list=["石头","剪刀","布"] computer=random.choice(list) print("计算机出拳:",computer) if player==computer: print("平局") -elif player=="布" and computer== "石头" or player == "剪刀" and computer == "布" or/ +elif player=="布" and computer== "石头" or player == "剪刀" and computer == "布" or \ player=="石头" and computer== "剪刀": print("你赢了") else: - print("你输了") + print("你输了") \ No newline at end of file -- libgit2 0.25.0