import turtle
turtle.color('orange')
turtle.pensize(3)
turtle.circle(75)
turtle.penup()
t.penup()#抬笔
t.pendown()#落笔
t.goto(x,y)#x,y分别为横坐标和纵坐标,表示将笔移到(x,y)这个位置上,通过改变x,y可以改变图形的位置,海龟作图的笔默认位置为(0,0)
![](https://img-blog.csdnimg.cn/040de57e892249e1b7f2547e158d787b.png)
五角星:
import turtle
turtle.color("yellow")
turtle.fd(46) #它将(在屏幕上)朝所面对的 x 轴正方向前进 46像素,随着它的移动画出一条线段
turtle.right(144)## 五角星的五个顶角各是36°,所以此处应该转(180-36)°=144°
turtle.right(144)
turtle.fd(125)
turtle.right(144)
turtle.fd(125)
turtle.right(144)
turtle.fd(125)
turtle.right(144)
turtle.fd(78)