Skip to content
Related Articles

Related Articles

How to draw 2-layered and colored spider web in Python using Turtle Module?

View Discussion
Improve Article
Save Article
Like Article
  • Difficulty Level : Expert
  • Last Updated : 01 Oct, 2020

Prerequisite: Python Turtle module Basics 

We all must have seen the spiderweb at our homes but have you ever wonder how many efforts and patience is required for building that. Let’s salute the efforts of Spider and continue building one by ourselves. Spiderwebs usually comprise radical and spiral threads. What if you can make a colored 2-layered spiderweb. Here is a simple tutorial.

Approach used :

 The turtle is moved back and forth to build the radical threads first. The turtle is rotated by an angle of 60 degrees to draw each radical thread.  The length of the spiral thread is set to 50 and reduced by 10 at each iteration. The inner loop is concerned with building single spiral thread and the layering of the web, while the outer loop controls the number of spirals to be built.


import turtle as t
# define turtle speed
# radical thread 
for i in range(6):
# spiral thread length
side = 50
# Spider web color
# building web
for i in range(10):
    t.goto(0, 0)
    for j in range(6):
    side = side - 10


My Personal Notes arrow_drop_up
Recommended Articles
Page :

Start Your Coding Journey Now!