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 b0c05b5540d68e3c5016ac3b309302420eb16aa3..0000000000000000000000000000000000000000 --- "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 944590fb89801e2e9075df76d5b06277d561f1b0..79927e2ac4f080c07c011db7e918e63d7364bcab 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 95761ceb8eef568239ef94bf5ff462021d9aac2b..f9a32d19506fd42310f07511a19c19cae9a1dcbf 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 859e805fca9567c3a65ffa1b02f8006eb19fd37f..9cfe989d1af8727a3cbdaba4fe51d02ca079364f 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 05efff0528e490bc3154bee39f4c7df1d095a332..c0632c56342cefccdc5683170eee55fc2be3da1d 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 cd24844875f3e07f8fabe68c3b91de8d42704a0c..0000000000000000000000000000000000000000 --- "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元")