From f4154b3a1c36c17469e5ce3c9c0374b3e463152c Mon Sep 17 00:00:00 2001 From: JackH <1620514129@qq.com> Date: Thu, 3 Jul 2025 21:46:54 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- day2/条件循环.py | 3 +-- day3/条件控制.py | 6 ++++++ 2 files changed, 7 insertions(+), 2 deletions(-) create mode 100644 day3/条件控制.py diff --git a/day2/条件循环.py b/day2/条件循环.py index e216c9e..4ece615 100644 --- a/day2/条件循环.py +++ b/day2/条件循环.py @@ -33,5 +33,4 @@ shot = "" for i in range(0, length): num = length - i - 1 shot += str[num] -print(shot) - +print(shot) \ No newline at end of file diff --git a/day3/条件控制.py b/day3/条件控制.py new file mode 100644 index 0000000..c6d8ce3 --- /dev/null +++ b/day3/条件控制.py @@ -0,0 +1,6 @@ +a = input("").split() +for i in a: + if i.isdigit(): + print(i*2) + else: + print(i) \ No newline at end of file