python turtle animation (7)


import turtle as t
t.tracer(100)
t.setup(1537,865)
t.bgcolor('black')
color=('red','blue')
t.ht()
t.width(10)
for i in range(1000):
    t.pencolor(color[i%2])
    t.begin_fill()
    t.fd(i)
    t.rt(90)
    t.fd(i)
    t.circle(22,90)
    t.circle(i,90)
    t.rt(272)
    t.end_fill()
t.done()
output:

Comments

Popular posts from this blog

python turtle animation 16

python turtle animation 15

python turtle animation 12