Skip to content
Related Articles

Related Articles

Draw Concentric Circles with VIBGYOR Using Turtle in Python

View Discussion
Improve Article
Save Article
  • Last Updated : 20 Oct, 2020

Prerequisite: Turtle Programming Basics

Turtle is an inbuilt module in Python. It provides drawing using a screen (cardboard) and turtle (pen). To draw something on the screen, we need to move the turtle (pen). To move turtle, there are some functions i.e forward(), backward(), etc.

To draw Concentric VIBGYOR :

Following steps are used :

  • Importing turtle module
  • Set a screen
  • Make Turtle object
  • Define a method for circle with dynamic radius and colour.
  • Write text by setting turtle object at required position.

Below is the implementation :


# import turtle package
import turtle
# Screen object
sc = turtle.Screen()
# Screen background color
# turtle object
pen = turtle.Turtle()
# turtle width
# function to draw a circle of
# rad radius and col color
def circle(col, rad, val):
    # set position for space
    pen.setpos(0, val)
# function to write text
# by setting positions
def text():
    pen.setpos(-100, 140)
    pen.write("Concentric VIBGYOR",
              font = ("Verdana", 15))
    pen.setpos(-82, -188)
    pen.write("Using Turtle Graphics",
              font = ("Verdana", 12))
# Driver code
if __name__ == "__main__" :
  # VIBGYOR color list
    col = ['violet', 'indigo', 'blue',
         'green', 'yellow', 'orange',
  # 7 Concentric circles
  for i in range(7):
      # function call
      circle(col[i], -20*(i+1), 20*(i+1))
  # function call

Output :

Concentric Vibgyor

My Personal Notes arrow_drop_up
Recommended Articles
Page :

Start Your Coding Journey Now!