Author : Atul Dattatray Dubal

Author : Atul Dattatray Dubal


Looking for a tutorial to draw Iron Man logo using python, then you are at the right place. Today in this tutorial I will show you how to draw Iron Man 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.iron man is most famous character in avengers and I am big fan.


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


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


Python Code To Iron Man Logo


import turtle # Top Part piece1=[[(-40, 120), (-70, 260), (-130, 230), (-170, 200), (-170, 100), (-160, 40), (-170, 10), (-150, -10), (-140, 10), (-40, -20), (0, -20)],[(0, -20), (40, -20), (140, 10), (150, -10), (170, 10), (160, 40), (170, 100), (170, 200), (130, 230), (70, 260), (40, 120), (0, 120)]] # Middle Part piece2=[[(-40, -30), (-50, -40), (-100, -46), (-130, -40), (-176, 0), (-186, -30), (-186, -40), (-120, -170), (-110, -210), (-80, -230), (-64, -210), (0, -210)],[(0, -210), (64, -210), (80, -230), (110, -210), (120, -170), (186, -40), (186, -30), (176, 0), (130, -40), (100, -46), (50, -40), (40, -30), (0, -30)]] #Bottom Part piece3=[[(-60, -220), (-80, -240), (-110, -220), (-120, -250),(-90, -280), (-60, -260), (-30, -260), (-20, -250), (0, -250)],[(0, -250), (20, -250), (30, -260), (60, -260), (90, -280), (120, -250),(110, -220), (80, -240), (60, -220), (0, -220)]] turtle.hideturtle() turtle.bgcolor('#ba161e') #Dark Red turtle.setup(500,600) turtle.title("I AM IRONMAN") piece1Goto=(0,120) piece2Goto=(0,-30) piece3Goto=(0,-220) turtle.speed(2) def draw_piece(piece,pieceGoto): turtle.penup() turtle.goto(pieceGoto) turtle.pendown() turtle.color('#fab104') #Light Yellow turtle.begin_fill() for i in range(len(piece[0])): x,y=piece[0][i] turtle.goto(x,y) for i in range(len(piece[1])): x,y=piece[1][i] turtle.goto(x,y) turtle.end_fill() draw_piece(piece1,piece1Goto) draw_piece(piece2,piece2Goto) draw_piece(piece3,piece3Goto) turtle.hideturtle() turtle.done()



Above is the python program to draw the Iron man 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 ironmanlogo.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 ironmanlogo.py

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

Iron man logo by using python turtle 


As you can see, we successfully drew the Iron man 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

और नया पुराने