0% found this document useful (0 votes)
19 views

Python Worm - Py

The document contains code that uses turtle graphics to draw a series of spirals by varying the position, size, and orientation of circles over multiple iterations.

Uploaded by

seled.ochko1204
Copyright
© © All Rights Reserved
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
19 views

Python Worm - Py

The document contains code that uses turtle graphics to draw a series of spirals by varying the position, size, and orientation of circles over multiple iterations.

Uploaded by

seled.ochko1204
Copyright
© © All Rights Reserved
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 3

from turtle import*

import turtle
ht()
color("violet")
for i in range(-400,145,136):
pu()
goto(i,0)
pd()
delay(15)
for j in range(0, 61, 30):
tracer(False)
clear()
begin_fill()
seth(0)
circle(38,j-90)
circle(4,-180)
rt(180)
circle(30,90-j)
circle(30,90)
seth(-90)
circle(38,-180)
seth(-90)
circle(30,180)
seth(-90)
circle(38,-j)
circle(4,-180)
rt(180)
circle(30,j)
seth(90)
circle(38,-180)
seth(90)
circle(30,180)
seth(90)
circle(38,-90)
end_fill()
tracer(True)
lt(1)
rt(1)
tracer(False)
pu()
goto(i+38,0)
seth(90)
fd(38)
pd()
for j in range(0, 61, 30):
tracer(False)
clear()
begin_fill()
seth(90)
circle(38,j-90)
circle(4,-180)
rt(180)
circle(30,90-j)
seth(-90)
circle(38,-180)
seth(-90)
circle(30,180)
seth(-90)
circle(38,-90)
circle(38,-j)
circle(4,-180)
rt(180)
circle(30,j+90)
seth(90)
circle(38,-180)
seth(90)
circle(30,180)
end_fill()
tracer(True)
lt(1)
rt(1)
tracer(False)
pu()
goto(i+68,0)
seth(90)
fd(68)
pd()
for j in range(0, 61, 30):
tracer(False)
clear()
begin_fill()
seth(180)
circle(30,90-j)
rt(180)
circle(4,-180)
circle(38,j-180)
seth(-90)
circle(30,180)
seth(-90)
circle(38,-180)
seth(-90)
circle(30,j)
rt(180)
circle(4,-180)
circle(38,-j)
seth(90)
circle(30,180)
seth(90)
circle(38,-180)
seth(90)
circle(30,90)
end_fill()
tracer(True)
lt(1)
rt(1)
tracer(False)
pu()
goto(i+98,0)
seth(90)
fd(38)
pd()
for j in range(0, 61, 30):
tracer(False)
clear()
begin_fill()
seth(90)
circle(30,90-j)
rt(180)
circle(4,-180)
circle(38,j-90)
seth(-90)
circle(30,180)
seth(-90)
circle(38,-180)
seth(-90)
circle(30,90+j)
rt(180)
circle(4,-180)
circle(38,-j-90)
seth(90)
circle(30,180)
seth(90)
circle(38,-180)
end_fill()
tracer(True)
lt(1)
rt(1)
tracer(False)

You might also like