绘制五角星

 

import turtle as t
t.fillcolor("red") #颜色填充函数
t.begin_fill()
while True:
    t.forward(200)
    t.right(144)
    if abs(t.pos()) < 1:#看画笔是否回到原点,回到原点为真
        break
t.end_fill()
import turtle
t= turtle.Turtle()
t.color("black") 
t.write("苏熙潼", font=("微软雅黑", 30, "bold")) 

posted @ 2020-09-14 20:04  sxt。  阅读(63)  评论(0)    收藏  举报