2018年11月5日
摘要: 普通递归版本二分法 def binary_search(n, left, right): if left <= right: middle = (left+right) // 2 if n < lst[middle]: right = middle - 1 elif n > lst[middle]: 阅读全文
posted @ 2018-11-05 21:55 Python_rookie 阅读(248) 评论(0) 推荐(0) 编辑
摘要: 内置函数的自制思维导图链接如下 https://www.processon.com/view/link/5be048e2e4b01ac49662fadb 阅读全文
posted @ 2018-11-05 21:32 Python_rookie 阅读(133) 评论(0) 推荐(0) 编辑
摘要: 以下是该程序设计要求: 准备emp.db文本文件如图所示:实际操作仅需先填入一行,并换行 阅读全文
posted @ 2018-11-05 21:07 Python_rookie 阅读(158) 评论(0) 推荐(0) 编辑
摘要: lst = [] for i in range(1,5000,3): lst.append(i) num = int(input('请输入一个数:')) left = 0 right = len(lst) - 1 count = 0 while left <= right: count += 1 m 阅读全文
posted @ 2018-11-05 20:52 Python_rookie 阅读(290) 评论(0) 推荐(0) 编辑