ThinkChat2.0新版上线,更智能更精彩,支持会话、画图、阅读、搜索等,送10W Token,即刻开启你的AI之旅 广告
``` import jieba import wordcloud w = wordcloud.WordCloud(width=600,height=400,background_color='black',font_path='msyhbd.ttc') file = open('c:\\523\\171160.txt',encoding="utf-8") txt = file.read() lst = jieba.lcut(txt) #print(type(lst)) lst1 = ''.join(lst) #print(len(lst1)) w.generate(lst1) w.to_file("shz.png") ``` ``` from turtle import * from math import * setup(600,500,None,None) title("我的海龟绘图ok") for y in range(11): pen_y = 190-45*y #print(pen_y) pen_x = -300-7.5*sqrt(3)*pow(-1,y)+7.5*sqrt(3) print(pen_x) penup() goto(pen_x,pen_y) pendown() for x in range(12): circle(30,steps=6) penup() forward(30*sqrt(3)) pendown() done() ```