
Introduction
Hello Folks, Welcome to copyassignment.com. In this tutorial, we’ll look at creating a CRED Logo Using Python Turtle. This will be a very short but fascinating article, especially for newbies, because we have commented on every line of code so that even a beginner can understand the concept.
To create a CRED logo, we divided the program into five sections to make it easier to grasp.
Explanation of Code!
Step 1. Importing Libraries
import turtle
We will use the turtle module, which you must import, to create a Turtle() Function. Turtle is an in-built Python module that allows users to manipulate a pen to draw on the screen.
Step 2. Set the background Color for Canvas
turtle.Screen().bgcolor("black")
Here we use Screen() and Bgcolor() Function to set the background color.
Step 3. Creating an object of the turtle
t=turtle.Turtle()
Step 4. Creating Outer Layer of CRED logo
t.goto(-166,100)
#goto(): This method is used to move the turtle to an absolute position.
t.width(5)
#width(): Set the pen size.
t.color("white")
#color(): Set the pen color.
t.forward(256)
#forward(): Move the turtle forward by the specified distance, in the direction the turtle is headed.
t.right(90)
#right(): Turn turtle right by angle units.
t.forward(220)
t.right(60)
t.forward(150)
t.right(60)
t.forward(150)
t.right(60)
t.forward(220)
To Create A Pentagon First we go to the location(-166,100). Set the pen size to 5 and the pen color to white. After that, we use the forward() and Right() Function To draw each line of a pentagon.
Step 5. Creating the Inner Lines(part 1)
t.penup()
#penup(): Pull the pen up – no drawing when moving.
t.goto(-86,50)
t.pendown()
#pendown(): Pull the pen down – drawing when moving.
t.right(90)
t.forward(136)
t.right(90)
t.forward(60)
t.color("black")
t.forward(40)
t.color("white")
t.forward(40)
t.right(60)
t.forward(104)
t.right(60)
t.forward(104)
t.right(60)
t.forward(106)
t.right(90)
t.forward(130)
Creating Inner liner we respectively use forward and right functions to draw lines.
Step 6. Creating the Inner Lines(part 1)
t.penup()
t.goto(10,-75)
t.pendown()
t.right(150)
t.forward(57)
t.right(60)
t.forward(57)
t.right(60)
t.forward(30)
t.penup()
t.goto(-163,-300)
t.pendown()
In this section, we will draw the inner three lines to complete the CRED logo.
Step 7. Adding Name!
t.write("CRED",font=("Sentic",65,"normal"))
turtle.done()
Source Code to draw CRED Logo using Python Turtle:
import turtle turtle.Screen().bgcolor("black") t=turtle.Turtle() t.goto(-166,100) t.width(5) t.color("white") t.forward(256) t.right(90) t.forward(220) t.right(60) t.forward(150) t.right(60) t.forward(150) t.right(60) t.forward(220) t.penup() t.goto(-86,50) t.pendown() t.right(90) t.forward(136) t.right(90) t.forward(60) t.color("black") t.forward(40) t.color("white") t.forward(40) t.right(60) t.forward(104) t.right(60) t.forward(104) t.right(60) t.forward(106) t.right(90) t.forward(130) t.penup() t.goto(10,-75) t.pendown() t.right(150) t.forward(57) t.right(60) t.forward(57) t.right(60) t.forward(30) t.penup() t.goto(-163,-300) t.pendown() t.write("CRED",font=("Sentic",65,"normal")) turtle.done()
Output:

Thank you for reading our post. Please leave us a comment on how you found it. Please visit copyassignment.com for additional turtle lessons.
Also Read:
- Oracle Hiring for Python internship 2023: Apply Now
- Capgemini hiring freshers and experienced in bulk with CTC 5-15 LPA. Apply now!
- IIT Kanpur’s Python Learning Program: Apply Now
- Microsoft Giving Free Machine Learning Course: Enroll Now
- Accenture Giving Free Developer Certificate in 2023
- Microsoft Bing Eating Google Traffic: Check results here
- ChatGPT 4 with videos next week: Unveiled by Microsoft
- DevSecOps Internship at IBM: Apply Now
- Python Internship at Cisco: Apply Now
- Python Internship at HP: Apply Now
- Python | Asking the user for input until they give a valid response
- Python | How to iterate through two lists in parallel?
- Python Internship at Lenovo: Apply Now
- Amazon Summer Internship 2023
- Python | How to sort a dictionary by value?
- Amazon Giving Free Machine Learning Course with Certificate: Enroll Now
- Elon Musk hiring AI researchers to develop OpenAI rival
- Why Elon Musk Quits OpenAI?
- Google Summer Internship 2023
- Python | How to split a list into equally-sized chunks?
- 5 Secret ChatGPT skills to make money
- Python | Remove items from a list while iterating
- Free Google Certification Courses
- 5 AI tools for coders better than ChatGPT
- Python | How to get dictionary keys as a list
- New secrets to Earn money with Python in 2023
- Flower classification using CNN
- How to represent Enum in Python?
- 5 methods | Flatten a list of lists | Convert nested list into a single list in Python
- What does if __name__ == __main__ do in Python?