03 2020 档案

摘要:turtle库是python语言中一个很流行的绘制图形的函数库,它是在一个横轴为x,纵轴为y的坐标系原点,根据一组函数指示,完成一系列指示,从而绘制图形。 画布:画布就是turtle为我们展开用于绘制的区域,我们可以设置他们的大小和初始位置。 在画布上,默认有一个坐标原点为画布中心的坐标轴, 坐标原 阅读全文
posted @ 2020-03-15 14:36 邓雅灵 阅读(125) 评论(0) 推荐(0) 编辑
摘要:import turtle turtle.pencolor("blue") #绘制外部大三角形 turtle.fd(200) turtle.seth(120) turtle.fd(200) turtle.seth(-120) turtle.fd(200) #绘制内部小三角形 turtle.seth( 阅读全文
posted @ 2020-03-15 14:21 邓雅灵 阅读(168) 评论(0) 推荐(0) 编辑
摘要:import turtle turtle.setup(650,350,200,200) turtle.penup() turtle.pensize(1) turtle.pencolor("red") turtle.fd(100) turtle.seth(30) turtle.pendown() tu 阅读全文
posted @ 2020-03-15 14:02 邓雅灵 阅读(174) 评论(0) 推荐(0) 编辑
摘要:import turtle turtle.fillcolor("red") turtle.begin_fill() count=1 while count<=5: turtle.forward(100) turtle.right(144) count+=1 turtle.end_fill() 阅读全文
posted @ 2020-03-15 13:49 邓雅灵 阅读(103) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示