Printing pattern with Recursion using Python Turtle Last Updated : 25 Oct, 2021 Summarize Comments Improve Suggest changes Share Like Article Like Report Pre-requisites: Turtle Programming in Python In this article, we are going to display the following pattern using Python Turtle with recursion. In this pattern, the first circle should start with 100-pixel radius, and each subsequent circle is 5 pixels smaller until it reaches radius 10 when the last circle is indrawn. The first circle is drawn with a red pen, then green, then yellow, then blue. Approach:Iterate through a list of colors red, green, yellow, blue.Set the pen colorCall a function to draw a circle with a radius size set to 100, the function will recursively call itself until it reaches size 10, which will be the last circle.Turn 90 degrees to the right.Below is the implementation: [tabby title="Python3"][sourcecode language="python3"]import turtle # Recursive function to print # circles with reducing radius def printCircle(r): # If radius is less than 10 if r < 10: return else: # function to draw circle # with radius r turtle.circle(r) # function calling itself # with radius decreased by 5 printCircle(r-5) # list of colors colors = ["red", "green", "yellow", "blue"] # printing circles for each color for c in colors: # setting stroke color of circle turtle.color(c) printCircle(100) # turning the pen 90 degrees to right turtle.right(90) # (optional) # To stop the window from closing input() [/sourcecode][tabbyending] Output: Comment More infoAdvertise with us Next Article Print a Spirograph using turtle in Python V vishnuthulasidosss Follow Improve Article Tags : Python Practice Tags : python Similar Reads Print a Spirograph using turtle in Python Pre-requisites: Turtle Programming in Python A spirograph is a very interesting geometrical figure which is often symmetrical to both the axes. It produces mathematical roulette curves of the variety technically known as hypotrochoids and epitrochoids. Here, we've used a range of colors to draw circ 1 min read Y Fractal tree in Python using Turtle A fractal is a never-ending pattern. Fractals are infinitely complex patterns that are self-similar across different scales. They are created by repeating a simple process over and over in an ongoing feedback loop. Driven by recursion, fractals are images of dynamic systems â the pictures of Chaos. 2 min read Draw Rainbow using Turtle Graphics in Python Turtle is an inbuilt module in Python. It provides:Â Drawing using a screen (cardboard).Turtle (pen). To draw something on the screen, we need to move the turtle (pen), and to move the turtle, there are some functions like the forward(), backward(), etc. Prerequisite: Turtle Programming Basics Draw 2 min read Draw sun using Turtle module in Python Prerequisite: Turtle Programming in Python In this article, let's learn how to draw the Sun using turtle in Python. Turtle is an inbuilt module in Python. It helps draw patterns by providing a screen and turtle (pen) as tools. To move the turtle as desired functions defined within the module like fo 1 min read Draw Graph Grid Using Turtle in Python 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. Approach: Follow 2 min read Draw tree using Turtle module in Python Prerequisite: Turtle module, Drawing Triangle, Drawing Rectangle There are many modules in python which depicts graphical illustrations, one of them is turtle, it is an in-built module in Python, which lets the user control a pen(turtle) to draw on screen(drawing board). It is mostly used to illustr 2 min read Like