Open In App

Python – Draw “GFG” logo using Turtle Graphics

Prerequisites: Turtle Programming in Python

Turtle is a Python feature like a drawing board, which let us command a turtle to draw all over it! We can use many turtle functions which can move the turtle around. Turtle comes into the turtle library. The turtle module can be used in both object-oriented and procedure-oriented ways.



Some of the commonly used methods are:

In this article, we will be drawing the logo of GeeksforGeeks which looks like this – 
 



 

Approach :

 

 

Below is the implementation.

 




# importing turtle for graphics
import turtle
  
# Forming the window screen
tut = turtle.Screen()
  
# background color green
tut.bgcolor("White")
  
# object
pen = turtle.Turtle()
  
#speed of pen
pen.speed(10)
  
# object color
pen.color("Green")
  
# object width
pen.width(10)
tut = turtle.Screen()
  
  
# Code for symbol
# backward C
for x in range(180):
    pen.forward(1)
    pen.right(1)
  
# up
pen.right(90)
pen.forward(50)
  
# right
pen.right(90)
pen.forward(130)
  
# down
pen.right(90)
pen.forward(50)
pen.left(90)
  
# forward C
for x in range(180):
    pen.backward(1)
    pen.right(1)
  
turtle.done()

 
Output :
 

 


Article Tags :