Pythondex
Turtle Python Programs

Draw Iron Man In Python Using Turtle Library

Last updated July 3, 2023 by Jarvis Silva

Looking for way to draw iron man in python then you are at the right place today in this tutorial I will show you how to draw iron man using python so follow this tutorial till the end.

Iron man is one of the most popular and loved character from the marvel movies but he is dead by sacrificing himself to save the universe, so to offer him a tribute today we draw him using our python skills. 

To draw iron man we will use the turtle library which can be used to draw things in python, want more drawing programs like this go here python turtle programs.

Python Code To Draw Iron Man


import turtle

canvas1 = [[(-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)]]
canvas2 = [[(-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)]]
canvas3 = [[(-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")
canvas1Goto = (0, 120)
canvas2Goto = (0, -30)
canvas3Goto = (0, -220)
turtle.speed(2)


def logo(a, b):
    turtle.penup()
    turtle.goto(b)
    turtle.pendown()
    turtle.color('#fab104')  # Light Yellow
    turtle.begin_fill()

    for i in range(len(a[0])):
        x, y = a[0][i]
        turtle.goto(x, y)

    for i in range(len(a[1])):
        x, y = a[1][i]
        turtle.goto(x, y)
    turtle.end_fill()


logo(canvas1, canvas1Goto)
logo(canvas2, canvas2Goto)
logo(canvas3, canvas3Goto)
turtle.hideturtle()
turtle.done()

Above is the code to draw iron man. 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.

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.


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 filename.py

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

Iron Man Drawing

As you can see, we successfully drew Iron Man. I hope you were able to follow along and run it 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.

This was for this tutorial I hope you found this tutorial helpful and useful. Do share this tutorial with your friends who might be interested in this program especially marvel fans.

Here are some more python drawing tutorial for you:

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 🙂