摘要: PIL库自我学习总结 PIL有如下几个模块:Image模块、ImageChops模块、ImageCrackCode模块、ImageDraw模块、ImageEnhance模块、ImageFile模块、ImageFileIO模块、ImageFilter模块、ImageFont模块、ImageGrab模块 阅读全文
posted @ 2020-04-12 19:45 youto有病 阅读(128) 评论(0) 推荐(0) 编辑
摘要: 1.认识jieba库和安装。 主要功能包括分词,添加自定义词典,关键词提取,词性标注,并行分词,Tokenize:返回词语在原文的起始位置,命令行分词等功能。 代码对 Python 2/3 均兼容 全自动安装:easy_install jieba 或者 pip install jieba / pip 阅读全文
posted @ 2020-04-05 18:30 youto有病 阅读(265) 评论(0) 推荐(0) 编辑
摘要: 一.基本实现 def hano(n,x,y,z): if n==1: print(x,"->",z) else: #将n-1个盘子从x->y hano(n-1,x,z,y) #将剩余的最后一个盘子从x->z print(x,"->",z) #将剩余的n-1个盘子从y->z hano(n-1,y,x, 阅读全文
posted @ 2020-04-05 18:18 youto有病 阅读(123) 评论(0) 推荐(0) 编辑
摘要: 1、画五角星 import turtle turtle.pensize(5) turtle.pencolor("yellow") turtle.fillcolor("red") turtle.begin_fill() for i in range(5): turtle.forward(200) tu 阅读全文
posted @ 2020-03-28 16:11 youto有病 阅读(129) 评论(0) 推荐(0) 编辑
摘要: 1.鸡兔同笼 描述 一个笼子里面关了若干只鸡和兔子(鸡有2只脚,兔子有4只脚,没有例外)。已经知道了笼子里脚的总数为a,则笼子里面至少有多少只动物,至多有多少只动物? ‪‬‪‬‪‬‪‬‪‬‮‬‪‬‮‬‪‬‪‬‪‬‪‬‪‬‮‬‪‬‪‬‪‬‪‬‪‬‪‬‪‬‮‬‫‬‭‬‪‬‪‬‪‬‪‬‪‬‮‬‭‬‪‬‪‬ 阅读全文
posted @ 2020-03-28 16:05 youto有病 阅读(440) 评论(0) 推荐(0) 编辑
摘要: 1、画五角星 import turtle turtle.pensize(5) turtle.pencolor("yellow") turtle.fillcolor("red") turtle.begin_fill() for i in range(5): turtle.forward(200) tu 阅读全文
posted @ 2020-03-28 15:49 youto有病 阅读(141) 评论(0) 推荐(0) 编辑
摘要: 代码: #JDTYZL.pyimport mathimport timescale=14s,m,=1,2print("执行开始".center(scale//2, "-"))start = time.perf_counter()for i in range(scale+1):s=math.sqrt( 阅读全文
posted @ 2020-03-22 21:16 youto有病 阅读(123) 评论(0) 推荐(0) 编辑
摘要: Python turtle库 1,Turtle库可以看作是小乌龟,在一个横轴为x、纵轴为y的平面坐标系中移动,并在爬行的路径上绘制了图形。turtle.setup(width, height, startx,starty) width, height: 宽和高 startx, starty: 矩形窗 阅读全文
posted @ 2020-03-22 20:56 youto有病 阅读(200) 评论(0) 推荐(0) 编辑
摘要: #JDTYZL.pyimport mathimport timescale=14s,m,=1,2print("执行开始".center(scale//2, "-"))start = time.perf_counter()for i in range(scale+1):s=math.sqrt((1-m 阅读全文
posted @ 2020-03-22 20:54 youto有病 阅读(108) 评论(0) 推荐(0) 编辑
摘要: import turtledef drawTriangle(num,len,flag flag*=-1 len/=2 if(num==1): if(flag==1): turtle.left(60) turtle.fd(len) turtle.right(120) turtle.fd(len) tu 阅读全文
posted @ 2020-03-15 21:34 youto有病 阅读(158) 评论(0) 推荐(0) 编辑