摘要: 1.math简介>>>importmath>>>dir(math)#这句可查看所有函数名列表['__doc__','__name__','__package__','acos','acosh','asin','asinh','atan','atan2','atanh','ceil','copysig... 阅读全文
posted @ 2015-09-14 22:00 Godiness 阅读(789) 评论(0) 推荐(0) 编辑
摘要: 4-1Python objects All Python objects have three attributes:type,ID,and value. All are readonly with a possible expection of the value(which can be c... 阅读全文
posted @ 2015-09-14 20:31 Godiness 阅读(553) 评论(0) 推荐(0) 编辑
摘要: 3-4Statements Ues ;3-5Statements Use\(unless part of a comma-separated sequence in which case \ is optional) 阅读全文
posted @ 2015-09-14 19:59 Godiness 阅读(184) 评论(0) 推荐(0) 编辑
摘要: 2-5 Loops and Numbers a) i = 0 while i 0: print 'positive' else: print 'zero'2-7 Loops and strings s = raw_input('enter a string:') for ... 阅读全文
posted @ 2015-09-14 19:48 Godiness 阅读(276) 评论(0) 推荐(0) 编辑
摘要: 1.1文件对象文件只是连续的字节序列。数据的传输经常会用到字节流,无论字节流是由单个字节还是大块数据组成.1.2文件内建函数open()和file() 内建函数open()的基本语法是: file_object=open(file_name,access_mode='r',buffering=-1)... 阅读全文
posted @ 2015-09-14 18:03 Godiness 阅读(8574) 评论(0) 推荐(0) 编辑