From a5780b60a489334997b3ea2f0b9e7cc7b3c1fc96 Mon Sep 17 00:00:00 2001 From: BellCodeEditor <bellcode_dev@bell.ai> Date: Thu, 7 Oct 2021 16:22:06 +0800 Subject: [PATCH] auto save --- day5.py | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 day5.py diff --git a/day5.py b/day5.py new file mode 100644 index 0000000..6e86d34 --- /dev/null +++ b/day5.py @@ -0,0 +1,23 @@ +#玩家出拳 +paly=input('请出拳') +print('玩家出拳'+paly) + +#计算机出拳 +import random + +list=['石头','剪刀','布'] +comput=random.choice(list) +print(comput) +if paly in list: + if paly==comput: + print('平局') + elif paly=='石头' and comput=='剪刀': + print('玩家赢了') + elif paly=='布' and comput=='石头': + print('玩家赢了') + elif paly=='剪刀' and comput=='布': + print('玩家赢了') + else: + print('玩家输了') +else: + print('输入错误') \ No newline at end of file -- libgit2 0.25.0