VOOZH about

URL: https://www.geeksforgeeks.org/python/draw-diamond-shape-using-turtle-graphics-in-python/

⇱ Draw Diamond shape using Turtle graphics in Python - GeeksforGeeks


  • Courses
  • Tutorials
  • Interview Prep

Draw Diamond shape using Turtle graphics in Python

Last Updated : 11 Jun, 2021

In this article, we are going to learn how to draw the shape of a Diamond using turtle graphics in Python.

Turtle graphics:

  • forward(length): moves the pen in the forward direction by x unit.
  • right(angle): rotate the pen in the clockwise direction by an angle x.
  • left(angle): rotate the pen in the anticlockwise direction by an angle x.

Approach:

  • Import the turtle modules.
  • Define an instance for the turtle.
  • First, make the bigger triangle
  • Then make three lines inside the bigger triangle
  • Then make 4 small triangles
  • Then make one line above these four triangles

Below is the Python implementation of the above approach:

Output:

👁 Image
Comment
Article Tags:
Article Tags: