From 514f079d94fe70f319cead2a5354cf7f7777447d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=A7=A6=E8=8B=B1=E6=9D=B0?= <327782001@qq.com> Date: Thu, 1 Jun 2023 19:49:58 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E5=87=BD=E6=95=B0=E5=AD=A6=E4=B9=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...\275\346\225\260\345\256\232\344\271\211.py" | 0 ...\253\351\200\237\344\275\223\351\252\214.py" | 9 --------- ...\203\344\271\240\346\241\210\344\276\213.py" | 4 +--- ...\250\347\232\204\345\276\252\347\216\257.py" | 4 +--- ...\232\344\271\211\350\257\255\346\263\225.py" | 1 - "05_\345\207\275\346\225\260/07_None.py" | 1 - "05_\345\207\275\346\225\260/test.py" | 17 ----------------- 7 files changed, 2 insertions(+), 34 deletions(-) rename "05_\345\207\275\346\225\260/02_\345\207\275\346\225\260\345\256\232\344\271\211.py" => "05_\345\207\275\346\225\260/01_\345\207\275\346\225\260\345\256\232\344\271\211.py" (100%) delete mode 100644 "05_\345\207\275\346\225\260/01_\345\207\275\346\225\260\345\277\253\351\200\237\344\275\223\351\252\214.py" rename "05_\345\207\275\346\225\260/03_\345\207\275\346\225\260\345\237\272\347\241\200\345\256\232\344\271\211\347\273\203\344\271\240\346\241\210\344\276\213.py" => "05_\345\207\275\346\225\260/02_\345\207\275\346\225\260\345\237\272\347\241\200\345\256\232\344\271\211\347\273\203\344\271\240\346\241\210\344\276\213.py" (95%) rename "05_\345\207\275\346\225\260/04_list\345\210\227\350\241\250\347\232\204\345\276\252\347\216\257.py" => "05_\345\207\275\346\225\260/03_list\345\210\227\350\241\250\347\232\204\345\276\252\347\216\257.py" (96%) delete mode 100644 "05_\345\207\275\346\225\260/test.py" diff --git "a/05_\345\207\275\346\225\260/02_\345\207\275\346\225\260\345\256\232\344\271\211.py" "b/05_\345\207\275\346\225\260/01_\345\207\275\346\225\260\345\256\232\344\271\211.py" similarity index 100% rename from "05_\345\207\275\346\225\260/02_\345\207\275\346\225\260\345\256\232\344\271\211.py" rename to "05_\345\207\275\346\225\260/01_\345\207\275\346\225\260\345\256\232\344\271\211.py" diff --git "a/05_\345\207\275\346\225\260/01_\345\207\275\346\225\260\345\277\253\351\200\237\344\275\223\351\252\214.py" "b/05_\345\207\275\346\225\260/01_\345\207\275\346\225\260\345\277\253\351\200\237\344\275\223\351\252\214.py" deleted file mode 100644 index b0c05b5..0000000 --- "a/05_\345\207\275\346\225\260/01_\345\207\275\346\225\260\345\277\253\351\200\237\344\275\223\351\252\214.py" +++ /dev/null @@ -1,9 +0,0 @@ -""" -演示:快速体验函数的开发及应用 -""" -# 需求,统计字符串的长度,不使用内置函数len() - -print("欢迎来到黑马程序员!请出示您的健康码以及72小时核酸证明,并配合测量体温!") -print("体温测量中,您的体温是:37.3度,体温正常请进!") - - diff --git "a/05_\345\207\275\346\225\260/03_\345\207\275\346\225\260\345\237\272\347\241\200\345\256\232\344\271\211\347\273\203\344\271\240\346\241\210\344\276\213.py" "b/05_\345\207\275\346\225\260/02_\345\207\275\346\225\260\345\237\272\347\241\200\345\256\232\344\271\211\347\273\203\344\271\240\346\241\210\344\276\213.py" similarity index 95% rename from "05_\345\207\275\346\225\260/03_\345\207\275\346\225\260\345\237\272\347\241\200\345\256\232\344\271\211\347\273\203\344\271\240\346\241\210\344\276\213.py" rename to "05_\345\207\275\346\225\260/02_\345\207\275\346\225\260\345\237\272\347\241\200\345\256\232\344\271\211\347\273\203\344\271\240\346\241\210\344\276\213.py" index 944590f..79927e2 100644 --- "a/05_\345\207\275\346\225\260/03_\345\207\275\346\225\260\345\237\272\347\241\200\345\256\232\344\271\211\347\273\203\344\271\240\346\241\210\344\276\213.py" +++ "b/05_\345\207\275\346\225\260/02_\345\207\275\346\225\260\345\237\272\347\241\200\345\256\232\344\271\211\347\273\203\344\271\240\346\241\210\344\276\213.py" @@ -1,11 +1,9 @@ """ 演示函数基础定义练习案例:自动查核酸 """ - # 定义函数 def check(): # 编写函数体输出信息 print("欢迎来到黑马程序员!\n请出示您的健康码以及72小时核酸证明!") - # 调用函数 -check() +check() \ No newline at end of file diff --git "a/05_\345\207\275\346\225\260/04_list\345\210\227\350\241\250\347\232\204\345\276\252\347\216\257.py" "b/05_\345\207\275\346\225\260/03_list\345\210\227\350\241\250\347\232\204\345\276\252\347\216\257.py" similarity index 96% rename from "05_\345\207\275\346\225\260/04_list\345\210\227\350\241\250\347\232\204\345\276\252\347\216\257.py" rename to "05_\345\207\275\346\225\260/03_list\345\210\227\350\241\250\347\232\204\345\276\252\347\216\257.py" index 95761ce..f9a32d1 100644 --- "a/05_\345\207\275\346\225\260/04_list\345\210\227\350\241\250\347\232\204\345\276\252\347\216\257.py" +++ "b/05_\345\207\275\346\225\260/03_list\345\210\227\350\241\250\347\232\204\345\276\252\347\216\257.py" @@ -12,14 +12,12 @@ def list_while_func(): # 循环控制变量通过下标索引来控制,默认0 # 每一次循环将下标索引变量+1 # 循环条件:下标索引变量 < 列表的元素数量 - # 定义一个变量用来标记列表的下标 - index = 0 # 初始值为0 + index = 0 # 初始值为0 while index < len(my_list): # 通过index变量取出对应下标的元素 element = my_list[index] print(f"列表的元素:{element}") - # 至关重要 将循环变量(index)每一次循环都+1 index += 1 diff --git "a/05_\345\207\275\346\225\260/06_\345\207\275\346\225\260\347\232\204\350\277\224\345\233\236\345\200\274\345\256\232\344\271\211\350\257\255\346\263\225.py" "b/05_\345\207\275\346\225\260/06_\345\207\275\346\225\260\347\232\204\350\277\224\345\233\236\345\200\274\345\256\232\344\271\211\350\257\255\346\263\225.py" index 859e805..9cfe989 100644 --- "a/05_\345\207\275\346\225\260/06_\345\207\275\346\225\260\347\232\204\350\277\224\345\233\236\345\200\274\345\256\232\344\271\211\350\257\255\346\263\225.py" +++ "b/05_\345\207\275\346\225\260/06_\345\207\275\346\225\260\347\232\204\350\277\224\345\233\236\345\200\274\345\256\232\344\271\211\350\257\255\346\263\225.py" @@ -15,4 +15,3 @@ def add(a, b): # 函数的返回值,可以通过变量去接收 r = add(5, 6) print(r) - diff --git "a/05_\345\207\275\346\225\260/07_None.py" "b/05_\345\207\275\346\225\260/07_None.py" index 05efff0..c0632c5 100644 --- "a/05_\345\207\275\346\225\260/07_None.py" +++ "b/05_\345\207\275\346\225\260/07_None.py" @@ -30,6 +30,5 @@ if not result: # 进入if表示result是None值 也就是False print("未成年,不可以进入") - # None用于声明无初始内容的变量 name = None diff --git "a/05_\345\207\275\346\225\260/test.py" "b/05_\345\207\275\346\225\260/test.py" deleted file mode 100644 index cd24844..0000000 --- "a/05_\345\207\275\346\225\260/test.py" +++ /dev/null @@ -1,17 +0,0 @@ - -print("----------------主菜单------------------") -print("周杰轮,您好,欢迎来到黑马银行ATM。请选择操作:") -print("查询余额\t[输入1]") -print("存款\t\t[输入2]") -print("取款\t\t[输入3]") -print("退出\t\t[输入4]") -input("请输入您的选择:") - -print() -print("----------------查询余额------------------") -print("周杰轮,您好,您的余额剩余:5000000元") -print("------------------------------") - -print("----------------取款------------------") -print("周杰轮,您好,您取款50000元成功") -print("周杰轮,您好,您的余额剩余:4950000元") -- GitLab