Python★代码

今天我们来尝试制作五角星★~

首先导入海龟并命名“t”

import turtle as t

之后就是完整代码了!!!

import turtle as t

t.color("red")
t.pensize(5)
t.begin_fill()
t.forward(100)
t.right(144)
t.forward(100)
t.right(144)
t.forward(100)
t.right(144)
t.forward(100)
t.right(144)
t.forward(100)
t.right(144)
t.end_fill()

csdn博客—————玩转编程!

你可能感兴趣的:(python)