ziheng - for循环

# 用for循环来画一个五角星
import turtle as t
a =295
b = 100
t.speed(0) # 速度 speed 1-10
# 圆 circle
t.color("blue")
# pen size
for i in range(1000):
    t.fd(i)  # i 是 0 499
    t.lt(i)  # i 是 0-499
    t.pensize(i/50)
    t.circle(i,60)
    t.lt(345)
    t.write("子恒")
t.done()

发布了254 篇原创文章 · 获赞 16 · 访问量 9489

猜你喜欢

转载自blog.csdn.net/houlaos/article/details/104062333