From 60bad6df9f8783d3149fe55f84d6dfdc3a134537 Mon Sep 17 00:00:00 2001 From: BellCodeEditor <bellcode_dev@bell.ai> Date: Wed, 20 Oct 2021 20:13:27 +0800 Subject: [PATCH] auto save --- tyuyg.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 tyuyg.py diff --git a/tyuyg.py b/tyuyg.py new file mode 100644 index 0000000..c29a35f --- /dev/null +++ b/tyuyg.py @@ -0,0 +1,16 @@ +import random as r +p=input("请出拳") +print("玩家出拳:"+p) +import random as r +gf=["石头","剪刀","布"] +b=r.choice(gf) +print("计算机出拳:"+b) +if p in gf: + if p==b: + print("平局") + elif (p=="剪刀"and b=="布")or(p=="石头"and b=="剪刀")or(p=="布"and b=="石头"): + print("你赢了!") + else: + print("你输了!") +else: + print("输入错误") \ No newline at end of file -- libgit2 0.25.0