Draw Mercedes Logo In Python Turtle With Code
Last updated June 12, 2023 by Jarvis Silva
Today in this tutorial I will show you how to draw the Mercedes car logo using python with code, Mercedes is one of the most popular and luxurious car, It is one of my favorite car so today I have decided to create a tutorial on drawing its logo in python.
We will use the turtle module to create this program in python.,Turtle is a GUI library with the help of this library you can draw anything in python.
Python Code To Draw Mercedes Logo
import turtle
pen = turtle.Turtle()
pen.shape("turtle")
pen.speed(2)
turtle.bgcolor('black')
pen.color("#fff")
pen.pensize(7)
pen.circle(154)
pen.left(90)
pen.penup()
pen.pensize(15)
pen.forward(150)
pen.pendown()
pen.forward(150)
pen.penup()
pen.forward(-150)
pen.left(120)
pen.pendown()
pen.forward(150)
pen.penup()
pen.forward(-150)
pen.left(120)
pen.pendown()
pen.forward(150)
pen.penup()
pen.forward(-150)
pen.left(120)
pen.hideturtle()
turtle.done()
Above is the complete code for drawing the Mercedes logo, so now let’s understand how this code works in some simple points:
- Import the turtle module for graphics functionality.
- Create a turtle object named ‘pen’ to use for drawing.
- Set the shape of the turtle to “turtle” and the speed to 2.
- Set the background color of the turtle graphics window to black.
- Set the color of the pen to white and the size to 7.
- Draw a circle with a radius of 154 using the pen.
- Adjust the pen size to 15 and draw three lines to form an equilateral triangle inside the circle.
- Lift the pen up to stop drawing.
- Hide the turtle.
- Notify the turtle graphics system that the drawing is complete.
- End the program.
- Display the resulting graphical output.
Now you can run this program for that you need to have python installed on your computer, If you don’t have then follow this guide: Install and setup python on your computer or you can use this online python compiler.
If you get any errors like turtle module not found after running then you might need to install the turtle library it is mostly preinstalled but still if you get error use below command to install.
pip install turtle
After you run the program successfully, it will open a new window and it will start drawing the Mercedes Logo and below is the finished drawing of the logo.
As you can see, we successfully drew the Mercedes logo using python. I hope you were able to run this program successfully.
Here are some more python drawing tutorials for you:
- Draw Pikachu using python with code.
- Draw doraemon using python turtle.
- Draw shinchan using python turtle.
- Draw I love you using python turtle.
- Draw Batman logo using python turtle.
- Draw Google Logo using python turtle.
- Make a python calculator using turtle.
- Draw christmas tree using python.
- Draw spiderman in python programming.
- Draw Python Logo Using Python.
- Draw Iron Man using python turtle with code.
- Draw A Heart Using python turtle with code.
- Draw car in python turtle with code.
- Draw a Cat In Python Turtle With Code.
- Draw Panda In Python Turtle With Code.
- Draw Netflix Logo Using Python Turtle.
- Draw Whatsapp Logo Using Python Turtle.
- Draw Windows Logo Using Python.
- Draw Apple Logo Using Python Turtle.
- Draw YouTube Logo Using Python Turtle.
- Draw India Map In Python Turtle.
- Draw Snapchat Logo Using Python Turtle.
- Draw TikTok Logo Using Python.
- Draw Instagram Logo Using Python Turtle.
I hope you found what you were looking for from this tutorial, and if you want more python guides and tutorials like this, do join our Telegram channel for future updates.
Thanks for reading, have a nice day 🙂