绘制半圆+三角形

image

   t.left(120)
    t.fillcolor("#fff000")
def draw_circle():
    t.begin_fill()
    t.hideturtle()
    t.pensize(4)
    l=150
    t.color("green")
    t.circle(-l,90)
    t.right(90)
    t.forward(300)
    t.right(90)
    t.circle(-l,90)
    t.fillcolor("green")
    t.end_fill()
draw_circle()
t.seth(0)
t.back(150)
t.seth(0)
t.begin_fill()
t.fillcolor("red")
for i in range(3):
    draw()
t.end_fill()



t.exitonclick() #turtle执行完后保留那个页面


image

posted @ 2022-10-15 10:49  Selina风乎舞雩  阅读(26)  评论(0)    收藏  举报