叠加三角形

import turtle as t
t.pencolor("blue")  #笔触为蓝色
#绘制外部大三角形
t.fd(200)
t.seth(120)
t.fd(200)
t.seth(-120)
t.fd(200)
#绘制内部小三角形
t.seth(0)
t.fd(100)
t.seth(60)
t.fd(100)
t.seth(180)
t.fd(100)
t.seth(-60)
t.fd(100)
t.seth(120)
t.fd(100)
t.seth(0)
t.done()

posted @ 2020-10-19 19:40  唯闻卿卿  阅读(124)  评论(0编辑  收藏  举报