2020年4月17日

PIL库使用小测试

摘要: 1 from PIL import Image 2 from PIL import ImageFilter 3 im = Image.open('C:/Users/86136/Pictures/Saved Pictures/lf.jpg') 4 om = im.filter(ImageFilter. 阅读全文

posted @ 2020-04-17 01:01 #f#f 阅读(260) 评论(0) 推荐(0)

2020年4月9日

jieba

摘要: 1 #jieba文本分析 2 import jieba 3 txt = open("C:/Users/86136/Documents/python文件测试/test.txt","rt",encoding="utf-8") 4 words=jieba.lcut(txt.read()) 5 counts 阅读全文

posted @ 2020-04-09 20:07 #f#f 阅读(116) 评论(0) 推荐(0)

2020年3月31日

初手级汉诺塔

摘要: 1 #汉诺塔 2 count = 0 3 n = int(input("请输入汉诺塔的层数:")) 4 def hnt(n,L,R,mid): 5 global count 6 if n == 1: 7 print("{}:{}->{}".format(1,L,R)) 8 count +=1 9 e 阅读全文

posted @ 2020-03-31 16:07 #f#f 阅读(205) 评论(0) 推荐(0)

2020年3月22日

带有进度条的圆周率计算

摘要: #带有进度条的圆周率计算 1 import time 2 m = 100 3 pi = 0 4 for i in range(m): 5 a ='*'*i 6 b ='.'*(m-i) 7 c = ((i+1)/m)*100 8 print("\r{:<3.0f}%[{}->{}]".format( 阅读全文

posted @ 2020-03-22 17:12 #f#f 阅读(145) 评论(0) 推荐(0)

2020年3月14日

turtle 库

摘要: 小鸭子简笔画 1 import turtle as t 2 t.setup(1200,800,200,500) 3 t.width(3) 4 #手 5 t.left(90) 6 t.bk(40) 7 t.fd(90) 8 t.circle(-60,90) 9 t.circle(-20,180) 10 阅读全文

posted @ 2020-03-14 16:43 #f#f 阅读(265) 评论(0) 推荐(0)

2020年3月11日

2020.3.11

摘要: #五角星 1 import turtle as t 2 t.setup(800,500,200,200) 3 t.width(2) 4 t.penup() 5 t.fd(-100) 6 t.pendown() 7 t.fillcolor("red") 8 t.begin_fill() 9 for i 阅读全文

posted @ 2020-03-11 17:27 #f#f 阅读(197) 评论(0) 推荐(0)

导航