import turtle turtle.pensize(10) turtle.color("blue") #定义颜色 turtle.penup() #penup和pendown()设置画笔抬起或放下时是否绘制直线 turtle.goto(-110,-25) #初始位置以中心坐标为(0,0) turtle.pendown() turtle.circle(45) #绘制圆的半径 turtle.pensize(10) turtle.color("black") turtle.penup() turtle.goto(0,-25) turtle.pendown() turtle.circle(45) turtle.pensize(10) turtle.color("red") turtle.penup() turtle.goto(110,-25) turtle.pendown() turtle.circle(45) turtle.pensize(10) turtle.color("yellow") turtle.penup() turtle.goto(-55,-75) turtle.pendown() turtle.circle(45) turtle.pensize(10) turtle.color("green") turtle.penup() turtle.goto(55,-75) turtle.pendown() turtle.circle(45)
原文地址:https://www.cnblogs.com/haisenberg/p/9949475.html
时间: 2024-10-08 12:15:30