import turtle turtle.pencolor("blue") #绘制外部大三角形 turtle.fd(200) turtle.seth(120) turtle.fd(200) turtle.seth(-120) turtle.fd(200) #绘制内部小三角形 turtle.seth(0) turtle.fd(100) turtle.seth(60) turtle.fd(100) turtle.seth(180) turtle.fd(100) trutle.seth(-60) turtle.fd(100) turtle.seth(120) turtle.fd(100) turtle.seth(0) trutle.done()
原文:https://www.cnblogs.com/Dengyaling/p/12497432.html