2020年3月11日
摘要: 1.五角星绘制 import turtle turtle.fillcolor("red") turtle.begin_fill() while True: turtle.forward(220) turtle.right(144) if abs(turtle.pos()) < 1: break tu 阅读全文
posted @ 2020-03-11 19:32 linantelope 阅读(199) 评论(0) 推荐(0) 编辑
摘要: 一、基础概念 1、画布:画布就是turtle为我们展开用于绘图区域, 我们可以设置它的大小和初始位置。常用的画布方法有两个:screensize()和setup()。 (1)turtle.screensize(canvwidth, canvheight, bg):参数分别为画布的宽(单位像素), 高 阅读全文
posted @ 2020-03-11 18:31 linantelope 阅读(1283) 评论(0) 推荐(0) 编辑