Draw tree using Turtle module in Python Last Updated : 01 Oct, 2020 Comments Improve Suggest changes Like Article Like Report 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 illustrate figures, shapes, designs etc. In this article, we will learn how to draw a simple tree using the turtle module. Illustrating a Tree consists of creating a single rectangle and then three triangles of same sizes sequentially from the bottom. Below are the steps to create a tree: Import turtle and math module.Set screen with dimensions and color.Create a turtle object.Create tree by illustrating stacked triangles and a rectangle. Below is the program of the above approach: Python3 # Python program to draw a tree using turtle # Importing required modules import turtle import math # Function to draw rectangle def drawRectangle(t, width, height, color): t.fillcolor(color) t.begin_fill() t.forward(width) t.left(90) t.forward(height) t.left(90) t.forward(width) t.left(90) t.forward(height) t.left(90) t.end_fill() # Function to draw triangle def drawTriangle(t, length, color): t.fillcolor(color) t.begin_fill() t.forward(length) t.left(135) t.forward(length / math.sqrt(2)) t.left(90) t.forward(length / math.sqrt(2)) t.left(135) t.end_fill() # Set the background color screen = turtle.Screen ( ) screen.bgcolor("skyblue") # Creating turtle object tip = turtle.Turtle() tip.color ("black") tip.shape ("turtle") tip.speed (2) # Tree base tip.penup() tip.goto(100, -130) tip.pendown() drawRectangle(tip, 20, 40, "brown") # Tree top tip.penup() tip.goto(65, -90) tip.pendown() drawTriangle(tip, 90, "lightgreen") tip.penup() tip.goto(70, -45) tip.pendown() drawTriangle(tip, 80, "lightgreen") tip.penup() tip.goto(75, -5) tip.pendown() drawTriangle(tip, 70, "lightgreen") Output:- Comment More infoAdvertise with us Next Article Draw tree using Turtle module in Python A anshitaagarwal Follow Improve Article Tags : Python Python-turtle Practice Tags : python Similar Reads 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 a Hut using turtle module in Python Turtle is a inbuilt module in Python, which has many functions like forward(), backward(), right() and left() etc. You can draw a hut on the screen just by using the turtle module in Python. In this article, we will create a hut using the turtle module. Approach: Import turtleSet the background colo 2 min read Draw a snowman using turtle module in Python Prerequisite: Turtle module, Drawing Shapes 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 illustrate figures, shapes, 2 min read Draw moving object using Turtle in Python Prerequisite: Python Turtle 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. To move turtle, there are some functions i.e forward(), backward(), etc. 1.)Move the Object (ball) 2 min read Draw Spiraling Polygon 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 funct 1 min read Draw Starry Sky with Moon using Turtle in Python Prerequisites: Turtle Programming in Python In Python, Turtle is an in-built library that provides us to draw different patterns, shapes or anything we want but for that, we have to be aware of the uses of different functions provided by Turtle library. In this article we are going to learn how to d 4 min read Draw a car using Turtle in Python Prerequisite: Turtle module, Drawing Shapes There are many modules in python which depict graphical illustrations, one of them is a turtle, it is an in-built module in Python, which lets the user control a pen(turtle) to draw on the screen(drawing board). It is mostly used to illustrate figures, sha 2 min read Draw Circle in Python using Turtle Turtle graphics is an engaging way to learn Python programming by visualizing geometric shapes. The turtle module lets you control a turtle to draw lines and shapes on the screen, making it an ideal tool for beginners. Below, we'll explore how to draw circles and create more complex patterns like ta 2 min read Draw Spiraling Star using Turtle in Python Prerequisite: Python Turtle Basics Turtle is an inbuilt module of python. It enables us to draw any drawing by a turtle and 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 fu 1 min read Draw an Olympic Symbol in Python using Turtle Prerequisites: Turtle Programming in Python The Olympic rings are five interlaced rings, colored blue, yellow, black, green, and red on a white field. As shown in the below image. Approach:import Turtle moduleset the thickness for each ringdraw each circle with specific coordinates Below is the impl 1 min read Like