摘要: import jieba txt = open("西游记.txt", "r", encoding='utf-8').read() words = jieba.lcut(txt) # 使用精确模式对文本进行分词 counts = {} # 通过键值对的形式存储词语及其出现的次数 for word in 阅读全文
posted @ 2020-11-13 09:39 小猪猪。。。 阅读(1610) 评论(0) 推荐(0)
摘要: import turtle, datetime def drawGap(): turtle.up() turtle.fd(5) def drawLine(draw): drawGap() if(draw): turtle.down() else: turtle.up() turtle.fd(40) 阅读全文
posted @ 2020-10-18 15:14 小猪猪。。。 阅读(1017) 评论(0) 推荐(0)
摘要: from math import* from time import* scale=20 s,m,=1,2 print("执行开始".center(scale//2, "-")) start = perf_counter() for i in range(scale+1): s=sqrt((1-sq 阅读全文
posted @ 2020-10-11 10:07 小猪猪。。。 阅读(95) 评论(0) 推荐(0)
摘要: import turtle for i in range(4): turtle.pencolor("red") turtle.pensize(2) turtle.penup() turtle.goto(0,-20*(i+1)) turtle.pendown() turtle.circle(20*(i 阅读全文
posted @ 2020-09-24 15:57 小猪猪。。。 阅读(117) 评论(0) 推荐(0)
摘要: import turtle turtle.pensize(5) turtle.pencolor("yellow") turtle.fillcolor("red") turtle.begin_fill() for i in range(5): turtle.forward(200) turtle.ri 阅读全文
posted @ 2020-09-24 15:32 小猪猪。。。 阅读(155) 评论(0) 推荐(0)
摘要: 1.概要 turtle是一个绘图库,是turtle绘图体系的python实现,是python语言的标准库之一。 (1)标准库+第三方库=python计算生态。 (2)标准库:随解释器直接安装到操作系统中的功能模板。 (3)第三方库:需要经过安装才能使用的功能模板。 (4)库Library,包Pack 阅读全文
posted @ 2020-09-21 21:50 小猪猪。。。 阅读(462) 评论(0) 推荐(0)
摘要: import turtle turtle.fd(100) turtle.left(120) turtle.fd(100) turtle.left(120) turtle.fd(50) turtle.left(120) turtle.fd(50) turtle.right(120) turtle.fd 阅读全文
posted @ 2020-09-15 18:41 小猪猪。。。 阅读(193) 评论(0) 推荐(0)
摘要: import turtle turtle.left(50) turtle.fd(100) turtle.right(120) turtle.fd(150) turtle.right(120) turtle.fd(150) turtle.right(120) turtle.fd(50) turtle. 阅读全文
posted @ 2020-09-15 18:32 小猪猪。。。 阅读(179) 评论(0) 推荐(0)
摘要: from turtle import* fillcolor("red") begin_fill() while True: forward(200) right(144) if abs(pos()) < 1: break end_fill() import turtle turtle.write(" 阅读全文
posted @ 2020-09-15 18:23 小猪猪。。。 阅读(209) 评论(0) 推荐(0)
摘要: import turtle # 设置初始位置 turtle.penup() turtle.left(90) turtle.fd(200) turtle.pendown() turtle.right(90) # 花蕊 turtle.fillcolor("red") turtle.begin_fill( 阅读全文
posted @ 2020-09-07 17:17 小猪猪。。。 阅读(72) 评论(0) 推荐(0)