From 1707439924e8fbfad9248daa61b2f1996d8ec64c Mon Sep 17 00:00:00 2001 From: BellCodeEditor <bellcode_dev@bell.ai> Date: Sat, 21 May 2022 14:26:51 +0800 Subject: [PATCH] save project --- 1 | 0 1.py | 5 +++++ diy1.py | 17 ++++++++++++++++- 3 files changed, 21 insertions(+), 1 deletion(-) create mode 100644 1 create mode 100644 1.py diff --git a/1 b/1 new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/1 diff --git a/1.py b/1.py new file mode 100644 index 0000000..eba0865 --- /dev/null +++ b/1.py @@ -0,0 +1,5 @@ +import turtle +pen=turtle.Pen +pen.write("S\nB",font=("Times",20,"normal")) +pen.hideturtle() +turtle.done() \ No newline at end of file diff --git a/diy1.py b/diy1.py index 80bc1c8..36c9d2e 100644 --- a/diy1.py +++ b/diy1.py @@ -3,4 +3,19 @@ print("玩家出拳:"+player) import random f=["石头","剪刀","布"] computer=random.choice(f) -print("计算机出拳:"+computer) \ No newline at end of file +print("计算机出拳:"+computer) + +if player==computer : + print("平局") +if player=="石头" and computer=="剪刀": + print("玩家赢") +if player=="剪刀" and computer=="布": + print("玩家赢") +if player=="布" and computer=="石头": + print("玩家赢") +if player=="剪刀" and computer=="石头": + print("玩家输") +if player=="布" and computer=="剪刀": + print("玩家输") +if player=="石头" and computer=="布": + print("玩家输") \ No newline at end of file -- libgit2 0.25.0