摘要: 1. PIL库主要有2个方面的功能: (1) 图像归档:对图像进行批处理、生产图像预览、图像格式转换等。 (2) 图像处理:图像基本处理、像素处理、颜色处理等。 2.在PIL中,任何一个图像文件都可以用Image对象表示Image类的图像读取和创建方法: 方法 描述 Image.open(filen 阅读全文
posted @ 2020-06-22 20:35 程序小白007 阅读(86) 评论(0) 推荐(0) 编辑
摘要: import jiebatxt = open("文章.txt","r",encoding='gbk',errors='replace').read()words = jieba.lcut(txt)counts = {}for word in words: if len(word) == 1: con 阅读全文
posted @ 2020-06-22 20:30 程序小白007 阅读(120) 评论(0) 推荐(0) 编辑
摘要: n=input("输入汉诺塔碟子总数") def move(n,a,b,c): if n==1: print(a,'->',c) else: move(n-1,a,c,b) move(1,a,b,c) move(n-1,b,a,c) 阅读全文
posted @ 2020-06-22 20:17 程序小白007 阅读(136) 评论(0) 推荐(0) 编辑
摘要: 一、 使用request库的get()函数访问360搜索网页20次并且打印返回状态,text内容,计算text()属性和content()属性所返回网页内容的长度。 对360搜索主页进行爬虫: 利用request库的get函数访问google 20次,输入代码为: import requests w 阅读全文
posted @ 2020-05-19 20:36 程序小白007 阅读(848) 评论(0) 推荐(0) 编辑
摘要: 1.学习笔记 numpy.empty numpy.empty 方法用来创建一个指定形状(shape)、数据类型(dtype)且未初始化的数组: numpy.empty(shape, dtype = float, order = 'C') ndarray对象的内容可以通过索引或切片来访问和修改,与 P 阅读全文
posted @ 2020-05-07 18:26 程序小白007 阅读(125) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2020-03-15 15:36 程序小白007 阅读(72) 评论(0) 推荐(0) 编辑
摘要: name=input("") print("Hello,"+name.title()+"同学!") 阅读全文
posted @ 2020-03-15 15:33 程序小白007 阅读(107) 评论(0) 推荐(0) 编辑
摘要: print("Hello, world!") 阅读全文
posted @ 2020-03-15 15:30 程序小白007 阅读(130) 评论(0) 推荐(0) 编辑
摘要: i=0 N=eval(input()) while i<6: temp=pow(N,i) print(temp) i=i+1 阅读全文
posted @ 2020-03-15 15:27 程序小白007 阅读(183) 评论(0) 推荐(0) 编辑
摘要: a=input("") b=input("") print(a+'我想对你说,'+b) 阅读全文
posted @ 2020-03-15 15:24 程序小白007 阅读(372) 评论(0) 推荐(0) 编辑