import turtle
pensize=80
banjing=40
# purple
turtle.pensize(pensize)
turtle.shape("turtle")
turtle.pencolor("purple")
turtle.lt(90)
turtle.circle(banjing,180)
# blue
turtle.up()
turtle.rt(90)
turtle.fd(pensize)
turtle.rt(90)
turtle.down()
turtle.pencolor("blue")
turtle.circle(-(banjing+pensize),180)
# skyblue
turtle.up()
turtle.lt(90)
turtle.fd(pensize)
turtle.lt(90)
turtle.down()
turtle.pencolor("skyblue")
turtle.circle(banjing+2*pensize,180)
# green
turtle.up()
turtle.rt(90)
turtle.fd(pensize)
turtle.rt(90)
turtle.down()
turtle.pencolor("green")
turtle.circle(-(banjing+3*pensize),180)
# yellow
turtle.up()
turtle.lt(90)
turtle.fd(pensize)
turtle.lt(90)
turtle.down()
turtle.pencolor("yellow")
turtle.circle(banjing+2*2*pensize,180)
# orange
turtle.up()
turtle.rt(90)
turtle.fd(pensize)
turtle.rt(90)
turtle.down()
turtle.pencolor("orange")
turtle.circle(-(banjing+5*pensize),180)
# red
turtle.up()
turtle.lt(90)
turtle.fd(pensize)
turtle.lt(90)
turtle.down()
turtle.pencolor("red")
turtle.circle(banjing+6*pensize,180)
turtle.done()
http://www.eeke5.com/
sam - 随便取名变量和彩虹
于 2022-03-02 12:27:57 首次发布