import turtle
turtle.pensize(20)
turtle.left(90)
#绘制红色
turtle.pencolor("red")
turtle.circle(100,180)
#橙色
turtle.pensize(18)
turtle.left(180)
turtle.penup()
turtle.goto(-2,0)
turtle.pendown()
x,y = turtle.pos()
turtle.setpos(x-5,y)
turtle.pencolor("orange")
turtle.circle(95,180)
#黄色
turtle.pensize(16)
turtle.left(180)
turtle.penup()
turtle.goto(-4,0)
turtle.pendown()
x,y = turtle.pos()
turtle.setpos(x-5,y)
turtle.pencolor("yellow")
turtle.circle(90,180)
#绿色
turtle.pensize(14)
turtle.left(180)
turtle.penup()
turtle.goto(-6,0)
turtle.pendown()
x,y = turtle.pos()
turtle.setpos(x-5,y)
turtle.pencolor("green")
turtle.circle(85,180)
#浅蓝色
turtle.pensize(12)
turtle.left(180)
turtle.penup()
turtle.goto(-8,0)
turtle.pendown()
x,y = turtle.pos()
turtle.setpos(x-5,y)
turtle.pencolor("lightblue")
turtle.circle(80,180)
#深蓝色
turtle.pensize(10)
turtle.left(180)
turtle.penup()
turtle.goto(-10,0)
turtle.pendown()
x,y = turtle.pos()
turtle.setpos(x-5,y)
turtle.pencolor("blue")
turtle.circle(75,180)
#紫色
turtle.pensize(8)
turtle.left(180)
turtle.penup()
turtle.goto(-12,0)
turtle.pendown()
x,y = turtle.pos()
turtle.setpos(x-5,y)
turtle.pencolor("purple")
turtle.circle(70,180)
turtle.done()
绘制七色彩虹
最新推荐文章于 2023-10-18 03:00:00 发布