From 151832e19584585684776990c100041cffaaba69 Mon Sep 17 00:00:00 2001 From: BellCodeEditor <bellcode_dev@bell.ai> Date: Sun, 21 Mar 2021 18:27:25 +0800 Subject: [PATCH] save project --- diy1.py | 107 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 107 insertions(+) create mode 100644 diy1.py diff --git a/diy1.py b/diy1.py new file mode 100644 index 0000000..b417c0c --- /dev/null +++ b/diy1.py @@ -0,0 +1,107 @@ +# 玩家出拳 +player=input("到你了(石/布/剪)") +print(player) +import random +list=["石","布","剪"] +computer=random.choice(list) +print(computer) +if player in list: + + if player==computer: + print("平局") + elif (player=="石" and computer=="剪")or (player=="布" and computer=="石")or (player=="剪" and computer=="布"): + print("兄弟你真厉害") + else: + print("你太菜了") +else: + print("错误") + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -- libgit2 0.25.0