摘要: import jieba excludes = {"将军","却说","荆州","二人","不可","不能","如此"} txt = open("sg.txt", "r", encoding='utf-8').read() words = jieba.lcut(txt) counts = {} fo 阅读全文
posted @ 2020-04-15 00:56 平平无奇的陈序员 阅读(215) 评论(0) 推荐(0)
摘要: 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) n=input() move(int(n),'A','B','C') 阅读全文
posted @ 2020-04-07 19:43 平平无奇的陈序员 阅读(114) 评论(0) 推荐(0)
摘要: import random import math import time n=pow(10,7) m=0.0 print("执行开始".center(20,'-')) for i in range(1,n+1): a='*'*i b='.'*i c=(i/n)*100 x,y=random.ran 阅读全文
posted @ 2020-03-30 20:51 平平无奇的陈序员 阅读(115) 评论(0) 推荐(0)
摘要: #五角星绘制import turtle as t t.penup() t.fd(-250) t.pendown() t.pensize(10) t.pencolor("yellow") t.fillcolor("red") t.begin_fill() for i in range(5): t.fd 阅读全文
posted @ 2020-03-15 11:19 平平无奇的陈序员 阅读(262) 评论(0) 推荐(0)
摘要: 1、turtle库是python语言中一个很流行的绘制图像的函数库 想象一只小乌龟,在一个横轴为x,纵轴为y的坐标系原点,(0,0)位置开始,它根据一组函数指令的控制,在这个平面坐标系中移动,从而在它爬行的路径上绘制图形。 2、turtle库 (1)turtle的一个画布空间,最小单位是像素。 (2 阅读全文
posted @ 2020-03-11 17:30 平平无奇的陈序员 阅读(555) 评论(0) 推荐(0)
摘要: 五角星绘制 import turtle as t t.penup() t.fd(-250) t.pendown() t.fillcolor("red") t.begin_fill() for i in range(4): t.fd(500) t.right(144) t.fd(500) t.end_ 阅读全文
posted @ 2020-03-11 16:36 平平无奇的陈序员 阅读(218) 评论(0) 推荐(0)