摘要: import jiebatxt = open("白雪公主.txt", "r", encoding='utf-8').read()words = jieba.lcut(txt)counts = {}for word in words: if len(word) == 1: continue else: 阅读全文
posted @ 2020-04-06 21:58 hhh黄如 阅读(149) 评论(0) 推荐(0)
摘要: a=0def hanoi(n,src,dst,mid): global a if n==1: print("{}:{}->{}".format(1,src,dst)) a+=1 else: hanoi(n-1,src,mid,dst) print("{}:{}->{}".format(n,src,d 阅读全文
posted @ 2020-03-31 16:08 hhh黄如 阅读(127) 评论(0) 推荐(0)
摘要: import turtle as tt.setup(600, 600, None,None)t.pu()t.fd(-120)t.pensize(5)t.width(5)t.pencolor("darkgreen")t.pd()t.fd(250)t.seth(120)t.pencolor("black 阅读全文
posted @ 2020-03-12 16:38 hhh黄如 阅读(1185) 评论(0) 推荐(0)
摘要: import turtle turtle.setup(500,500) turtle.fillcolor("red") turtle.begin_fill() for i in range(5): turtle.fd(100) turtle.right(144) turtle.end_fill() 阅读全文
posted @ 2020-03-11 16:34 hhh黄如 阅读(1483) 评论(0) 推荐(0)
摘要: import turtle turtle.left(30)turtle.forward(144) turtle.right(60)turtle.forward(144) turtle.right(60)turtle.forward(144) turtle.right(60)turtle.forwar 阅读全文
posted @ 2020-03-11 16:28 hhh黄如 阅读(2043) 评论(0) 推荐(0)