📜  import turtle t=turtle.Turtle() def star(t): for t in range(5): t.color("red") t.pendown() t.begin_fill() t.forward(100) t.right (144) t.end_fill() - 任何代码示例

📅  最后修改于: 2022-03-11 14:59:30.897000             🧑  作者: Mango

代码示例1
import turtle
t=turtle.Turtle()

def star(t):
    for t in range(5):
        t.color("red")
        t.pendown()
        t.begin_fill()
        t.forward(100)
        t.right(144)
        t.end_fill()