- 博客(7)
- 资源 (1)
- 收藏
- 关注
原创 爬虫开始例子
#-- coding:utf -8--#——-PYTHON 获取网页内容————-#import sys, urlliburl = “https://www.zhihu.com/question/20899988” #网页地址wp = urllib.urlopen(url) #打开连接content = wp.read() #获取页面内容fp = open(“E:\python.txt”,”w”)
2016-01-21 18:53:01 706
原创 isPrime
__author__ = 'gate_007' #encoding:utf-8 # import math from math import sqrt NUM = 50 ret = [] def isPrime(): for i in range(2, NUM): PRIME = True for j in range(2, int(sqrt(i)
2016-01-03 20:11:20 1380
原创 scienceComputer
__author__ = 'gate_007' #encoding:utf-8 import time import math def scienceComputer(): data1 = 12*34 + 78 -132/6 data2 = (12*34 + 78 -132)/6 data3 = (86/40)**5 print '%d' %data
2016-01-03 19:21:52 247
原创 isLeapYear
__author__ = 'gate_007' #encoding:utf-8 import time def isLeapYear(): print "time.localtime() : %s" % time.localtime() year = time.localtime()[0] print '%d' %year if( year %
2016-01-02 12:05:05 2871
原创 for
__author__ = 'gate_007' #encoding:utf-8 def test1(): for i in xrange(0,5): for j in xrange(0,5): print i, " ", j print print "test1 done " def test2(): for
2016-01-02 11:28:51 409
转载 欢迎使用CSDN-markdown编辑器
欢迎使用Markdown编辑器写博客本Markdown编辑器使用StackEdit修改而来,用它写博客,将会带来全新的体验哦: Markdown和扩展Markdown简洁的语法 代码块高亮 图片链接和图片上传 LaTex数学公式 UML序列图和流程图 离线写博客 导入导出Markdown文件 丰富的快捷键 快捷键 加粗 Ctrl + B 斜体 Ctrl + I 引用 Ctrl
2016-01-02 11:27:57 572
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人