今天继续学习Python,修改文件。 一,往文件里面添加数据,内存里面有缓冲区,等缓冲区满了再把数据写到磁盘里面。 二,简单粗暴直接修改文件 分析思路: (B)快速修改文件,通过两个文件进行修改 三,函数。 函数一词来源于数学,但编程中的「函数」概念,与数学中的函数是有很大不同的,编程中的函数在英文 ...
分类:
编程语言 时间:
2018-04-20 11:43:09
阅读次数:
191
Github项目地址: 估计将在程序的各个模块的开发上耗费的时间: 预测时间(分钟) Planning 计划 5 Estimate 估计这个任务需要多少时间 180 Development 开发 15 Analysis 需求分析 15 Design Spec 生成设计文档 5 Design Revi ...
分类:
其他好文 时间:
2018-04-18 22:28:06
阅读次数:
215
1 tag = True 2 while tag: 3 # print('请输入:1\n2\n3\n4\n') 4 if tag: 5 print('level') 6 choice = input('请输入:') 7 if choice=='quit': 8 break 9 ... ...
分类:
其他好文 时间:
2018-04-18 14:24:32
阅读次数:
140
#-*-coding:utf-8-*-import profilefrom fractions import Fractionimport randomdef count(): n = random.randint(1,2) if n == 1: x = ['+','-','*','÷'] i = ...
分类:
其他好文 时间:
2018-04-17 23:49:22
阅读次数:
176
path = [] while True: temp = db for item in path: temp = temp[item] print("当前所有的子节点:",list(temp.keys())) choice = input("1:添加节点;2:查看节点;(Q/b);\n>>>") i... ...
分类:
其他好文 时间:
2018-04-16 14:31:02
阅读次数:
196
product_list = [ ('iphone',8000), ('Mac Pro',9800), ("Bike",3000), ("Watch",10000), ("Cofee",30), ("Book",100),] #定义商品列表shoppint_list = [] #购物车空列表whil ...
分类:
编程语言 时间:
2018-04-15 22:53:05
阅读次数:
176
Just calm down,just do it,time will show that you have made the right choice! 1.现在睡觉的话会做梦,而现在学习的话会让梦实现 This moment will nap, you will have a dream; ...
分类:
其他好文 时间:
2018-04-13 13:28:16
阅读次数:
191
def v_code(): ret = '' for i in range(5): num = random.randint(0,9) alf = chr(random.randint(65,122)) s = str(random.choice([num,alf])) ret += s retur ...
分类:
编程语言 时间:
2018-04-12 19:52:58
阅读次数:
139