Hyocheong

  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

2020年3月11日

摘要: 1、绘图窗口设置命令 turtle.setup(400,300,200,100):(宽,高,距离屏幕左边距离,距离屏幕上方距离) 2、运动命令 turtle.goto(x,y):直接跳转到(x,y)点,以绘图窗口中心为原点,向右为x轴,向上为y轴。 turtle.fd(d)、turtle.forwa 阅读全文
posted @ 2020-03-11 16:54 Hyocheong 阅读(298) 评论(0) 推荐(0)

摘要: 五角星绘制 import turtleturtle.fillcolor('red')turtle.begin_fill()for i in range(5): turtle.fd(200) turtle.right(144)turtle.end_fill() 六角形绘制 import turtle 阅读全文
posted @ 2020-03-11 16:36 Hyocheong 阅读(107) 评论(0) 推荐(0)