import turtle
t = turtle.Pen() # 画笔用于画图
t.speed(0)
花纹颜色
饼身颜色
画 饼身部分
def outfill_flower(flower_num: “花瓣数量”, flower_color: “花瓣颜色”):
for i in range(flower_num):
t.left(i * (360 // flower_num))
t.color(flower_color)
t.penup()
t.forward(200)
t.pendown()
t.fillcolor(flower_color)
t.begin_fill()
t.circle(60)
t.end_fill()
t.penup()
t.home()
画 饼身外围 花纹部分
def out_line_flower(flower_num: “花纹数量”, flower_color: “花纹颜色”):
for i in range(flower_num):
t.pensize(5)
t.left(i * (360 // 18))
t.color(flower_color)
t.penup()
t.forward(192)
t.pendown()
t.circle(60)
t.penup()
t.home()
画内测的大圆 大圆的填充色比饼身略亮
def big_circle(circle_color: “大圆颜色”, circle_fill_color: “大圆填充颜色”, circle_size: “大圆半径”):
t.goto(circle_s