python叠加等边三角形绘制

import turtle 
turtle .pu()
turtle .fd(-120)
turtle.pensize(3)
turtle.width(5)
turtle.pencolor("green")
turtle.pd()
turtle.fd(250)
turtle.seth(120)
turtle.pencolor("green")
turtle.fd(250)
turtle.seth(-120)
turtle.pencolor("blue")
turtle.fd(250)
turtle.pencolor("blue")
turtle.fd(250)
turtle.seth(0)
turtle.pencolor("black")
turtle.fd(250)
turtle.pencolor("black")
turtle.fd(250)
turtle.seth(120)
turtle.pencolor("yellow")
turtle.fd(250)
turtle.seth(-120)
turtle.pencolor("yellow")
turtle.fd(250)
turtle.seth(120)
turtle.pencolor("purple")
turtle.fd(250)

 

posted @ 2020-09-15 23:53  苦力搬运工  阅读(5687)  评论(0)    收藏  举报