Author : Atul Dattatray Dubal

Author : Atul Dattatray Dubal



Looking for a tutorial to draw Avengers logo using python, then you are at the right place. Today in this tutorial I will show you how to draw Avengers logo in python turtle, so follow this tutorial till the end.


Marvel Avengers is one of the most popular franchise in the world. I am a fan of Marvel avengers movies. They are awesome and amazing.


So today as a fan, I have decided to create this tutorial on drawing Avengers logo using python programming.


I will show you how to draw the Avengers logo and provide you with the code of this program.


Python Code To Draw Avengers Logo


import turtle def draw_circle(pen): # outer circle pen.setposition(0, -280) pen.pendown() pen.begin_fill() pen.color('orange') pen.pencolor('white') pen.circle(300) pen.end_fill() pen.penup() def draw_circle2(pen): # inner circle pen.pensize(2) pen.setposition(0, -230) pen.pendown() pen.begin_fill() pen.color('black') pen.circle(250) pen.end_fill() pen.penup() def draw_A(pen): # drawing ‘A’ pen.setposition(30, -110) pen.pendown() pen.begin_fill() pen.color('orange') pen.pensize(10) pen.pencolor('white') pen.forward(23) pen.backward(123) pen.left(60) pen.backward(220) pen.right(60) pen.backward(100) pen.right(117) pen.backward(710) pen.right(63) pen.backward(110) pen.right(90) pen.backward(510) pen.right(90) pen.backward(100) pen.right(90) pen.backward(70) pen.end_fill() pen.penup() def draw_triangle(pen): # Triangle shape in ‘A’ to make it look like 2d pen.pensize(10) pen.setposition(53, -40) pen.pendown() pen.begin_fill() pen.color('black') pen.pencolor('white') pen.right(90) pen.forward(100) pen.right(115) pen.forward(250) pen.right(157) pen.forward(227) pen.end_fill() def draw_arrow(pen): # arrow pen.backward(80) pen.left(42) pen.forward(147) pen.right(83) pen.forward(140) if __name__ == '__main__': win = turtle.Screen() win.bgcolor('black') avengers = turtle.Turtle() avengers.speed(10) avengers.pensize(10) avengers.penup() draw_circle(avengers) draw_circle2(avengers) draw_A(avengers) draw_triangle(avengers) draw_arrow(avengers) avengers.penup() avengers.setposition(300,300) avengers.pencolor("orange") avengers.write('AP Coders') avengers.hideturtle() turtle.done()



Above is the python program to draw the Avengers logo. Now to run this program 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.


To run this python program, follow the below steps:


  1. Create a new folder for this python project.
  2. Open it in a code editor of your choice.
  3. Create a python file with an avengers_logo.py 
  4. Copy the above code and paste it in your file.

Now you have the code, but there is one last thing you need to do as I have said I have used the turtle library for this program so you might need to install it if you get any errors like turtle module not found.


Turtle comes pre-installed with python setup, but if you get any errors you can reinstall it using the below command.



pip install turtle

So now you have everything setup and you are ready to run the program, so to run this program open a command prompt at your program folder location and paste the below command.



python avengers_logo.py

The above command will run the program and it will open a new window and it will start drawing the and below is the finished drawing of the Avengers logo.



Avengers logo by using python turtle 


As you can see, we successfully drew the Avengers logo using python turtle. I hope you were able to run this program successfully. 


Don’t want to create all the files and folders then you can run this program now using this online python compiler it is fast and easy.



Read Also This Article :-




Post a Comment

If You have any questions please comment here

और नया पुराने