admin 管理员组

文章数量: 887031

turtle

import turtle#初始化设置
turtle.penup()
turtle.pensize(5)
turtle.goto(0,-100)
turtle.pendown()
#画圆
turtle.circle(100,360)turtle.pensize(1)
#绘制十字星
turtle.penup()
turtle.goto(-120,0)
turtle.pendown()
turtle.forward(240)turtle.penup()
turtle.goto(0,-120)
turtle.left(90)
turtle.pendown()
turtle.forward(240)#绘制虚线 内圆  #turtle里的圆方向:逆时针来画的
turtle.penup()
turtle.goto(0,-50)
turtle.pendown()
turtle.right(90)
turtle.circle(50,-22.5)
turtle.circle(50,45)turtle.penup()
turtle.circle(50,45)
turtle.pendown()turtle.circle(50,45)turtle.penup()
turtle.circle(50,45)
turtle.pendown()turtle.circle(50,45)turtle.penup()
turtle.circle(50,45)
turtle.pendown()turtle.circle(50,45)#隐藏画笔形状
turtle.hideturtle()
turtle.done()

本文标签: turtle