From ffc0ae25c354ad715c6124c10a077a8d81706f03 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E9=93=B6=E5=86=9B?= Date: Mon, 1 Dec 2025 16:56:23 +0800 Subject: [PATCH] no message --- pythonProject/第二章/while/2.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/pythonProject/第二章/while/2.py b/pythonProject/第二章/while/2.py index 593d450..2780be8 100644 --- a/pythonProject/第二章/while/2.py +++ b/pythonProject/第二章/while/2.py @@ -1,7 +1,8 @@ s=0 -i=0 #初始值 +i=1 #初始值 while i<=100: #条件 s+=i #语句块 i+=1 -else: - print(s) \ No newline at end of file +print(s) +print("-----") +print(i) \ No newline at end of file