Draw Batman Logo In Python Turtle
Last updated July 3, 2023 by Jarvis Silva
Love Batman, who doesn’t? so you want to draw batman logo in python. Today In this python tutorial we will see how to draw batman logo using python turtle library.
Batman is one of the most popular DC superhero, He is one of my favourite so I decided to draw him using python skills.
Python code to draw batman logo
import turtle #initialize method bat = turtle.Turtle() #size of pointer and pen bat.turtlesize(1, 1, 1) bat.pensize(3) #screen info wn = turtle.Screen() wn.bgcolor("white") wn.title("BATMAN") #colour bat.color("yellow", "black") #begin filling color bat.begin_fill() #turn1 bat.left(90) # turn pointer direction to left of 90' bat.circle(50, 85) #draw circle of radius = 50 and 85' bat.circle(15, 110) bat.right(180) #turn 2 bat.circle(30, 150) bat.right(5) bat.forward(10) #draw forward line of 10 units #turn 3 bat.right(90) bat.circle(-70, 140) bat.forward(40) bat.right(110) #turn 4 bat.circle(100, 30) bat.circle(30, 100) bat.left(50) bat.forward(50) bat.right(145) #turn5 bat.forward(30) bat.left(55) bat.forward(10) #reverse #turn 5 bat.forward(10) bat.left(55) bat.forward(30) #turn 4 bat.right(145) bat.forward(50) bat.left(50) bat.circle(30, 100) bat.circle(100, 30) #turn 3 bat.right(90) bat.right(20) bat.forward(40) bat.circle(-70, 140) #turn 2 bat.right(90) bat.forward(10) bat.right(5) bat.circle(30, 150) #turn 1 bat.left(180) bat.circle(15, 110) bat.circle(50, 85) #end color filling bat.end_fill() #end the turtle method turtle.done()
Copy the above python code and paste it in a python file and run the file in your computer or use an online python compiler.
As I have mentioned at the beginning that I have used turtle to create this program, Turtle module is usually presinstalled with python so you don’t have to install it manually but if you get any errors saying turtle module not found then you can install it by using below command.
pip install turtle
Now you just have to run the code, after running below is the final output you should get. If you don’t have python installed, you can read this guide: Install and setup python on your computer.
This was the python tutorial to draw batman logo, I hope you liked it and found it helpful. Do try and run this program on your computer and show it to Batman fans.
Here are some more python tutorials you will find interesting:
- Draw doraemon in python using turtle code.
- Draw shinchan in python using turtle.
- Wish happy birthday using python turtle.
I hope you found what you were looking for from this tutorial. If you did, share it with your friends and also join our Telegram channel for future updates.
Thanks for reading, I am batman!!
Free courses and programming resourcesJoin Telgram