Printing pattern with Recursion using Python Turtle Last Updated : 25 Oct, 2021 Comments Improve Suggest changes 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 Printing pattern with Recursion using Python Turtle V vishnuthulasidosss Follow Improve Article Tags : Python Recursion DSA Practice Tags : pythonRecursion 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 Create pong game using Python - Turtle Pong is one of the most famous arcade games, simulating table tennis. Each player controls a paddle in the game by dragging it vertically across the screen's left or right side. Players use their paddles to strike back and forth on the ball. Turtle is an inbuilt graphic module in Python. It uses a p 3 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 Turtle Race Game Using Python - Turtle Graphics Library Turtle graphics is a popular way to introduce programming concepts to beginners. It's a fun and interactive module in Python that lets you create simple drawings and animations using a "turtle" that moves around the screen. In this tutorial, we'll create an exciting turtle race game where you can be 4 min read Draw Spiraling Triangle using Turtle in Python Prerequisite: Python Turtle Basic Turtle is an inbuilt module of python. It enables us to draw any drawing by a turtle, methods defined in the turtle module, and by using some logical loops. To draw something on the screen(cardboard) just move the turtle(pen). To move turtle(pen) there are some func 1 min read Like