Title: Drawing Doraemon Using Python Turtle: A Step-by-Step Tutorial
Introduction:
Python is a versatile programming language that can be used for various applications, including creating visual graphics. One of the popular libraries for creating graphics in Python is the turtle module. In this tutorial, we will explore how to draw Doraemon, the beloved robotic cat character, using Python turtle. So, let's get started and bring Doraemon to life on our computer screens!
Step 1: Setting up the Environment
To begin, we need to make sure that Python and the turtle module are installed on your system. You can download Python from the official Python website (python.org), and the turtle module comes pre-installed with Python. Once you have Python ready, you can proceed to the next step.
Step 2: Importing the Turtle Module
In your Python script, import the turtle module by adding the following line of code at the top:
```python
import turtle
```
Step 3: Creating the Turtle Window
Next, we need to create a turtle window where our drawing will appear. To do this, add the following lines of code:
```python
window = turtle.Screen()
window.title("Drawing Doraemon")
window.bgcolor("white")
```
Step 4: Defining the Turtle Object
Now, let's define the turtle object that will be responsible for drawing Doraemon. Add the following lines of code:
```python
doraemon = turtle.Turtle()
doraemon.speed(3)
```
Step 5: Drawing Doraemon's Face
We will start by drawing Doraemon's face. Add the following lines of code:
```python
doraemon.penup()
doraemon.goto(0, -100)
doraemon.pendown()
doraemon.begin_fill()
doraemon.color("blue")
doraemon.circle(100)
doraemon.end_fill()
```
Step 6: Drawing Doraemon's Eyes
Next, let's draw Doraemon's eyes. Add the following lines of code:
```python
doraemon.penup()
doraemon.goto(-40, 20)
doraemon.pendown()
doraemon.begin_fill()
doraemon.color("white")
doraemon.circle(20)
doraemon.end_fill()
doraemon.penup()
doraemon.goto(-40, 25)
doraemon.pendown()
doraemon.begin_fill()
doraemon.color("black")
doraemon.circle(8)
doraemon.end_fill()
doraemon.penup()
doraemon.goto(40, 20)
doraemon.pendown()
doraemon.begin_fill()
doraemon.color("white")
doraemon.circle(20)
doraemon.end_fill()
doraemon.penup()
doraemon.goto(40, 25)
doraemon.pendown()
doraemon.begin_fill()
doraemon.color("black")
doraemon.circle(8)
doraemon.end_fill()
```
Step 7: Drawing Doraemon's Nose
Now, let's draw Doraemon's nose. Add the following lines of code:
```python
doraemon.penup()
doraemon.goto(0, 10)
doraemon.pendown()
doraemon.begin_fill()
doraemon.color("red")
doraemon.circle(10)
doraemon.end_fill()
```
Step 8: Drawing Doraemon's Mouth
Next, let's draw Doraemon's mouth. Add the following lines of code:
```python
doraemon.penup()
doraemon.goto(-40, -20)
doraemon.pendown()
dora
emon.color("black")
doraemon.left(45)
doraemon.circle(40, 90)
doraemon.setheading(180)
doraemon.circle(40, 90)
doraemon.setheading(90)
doraemon.left(45)
doraemon.circle(-40, 180)
```
Step 9: Adding Doraemon's Whiskers
To make Doraemon look more authentic, let's add his whiskers. Add the following lines of code:
```python
doraemon.penup()
doraemon.goto(-30, 5)
doraemon.pendown()
doraemon.setheading(90)
for _ in range(2):
doraemon.forward(35)
doraemon.right(45)
doraemon.forward(35)
doraemon.left(90)
```
Step 10: Adding Doraemon's Ears
Finally, let's add Doraemon's ears. Add the following lines of code:
```python
doraemon.penup()
doraemon.goto(-70, 90)
doraemon.pendown()
doraemon.begin_fill()
doraemon.color("blue")
doraemon.circle(30)
doraemon.end_fill()
doraemon.penup()
doraemon.goto(70, 90)
doraemon.pendown()
doraemon.begin_fill()
doraemon.color("blue")
doraemon.circle(30)
doraemon.end_fill()
```
Step 11: Finishing Up
To complete the drawing, add the following lines of code at the end:
```python
turtle.done()
```
Conclusion:
Congratulations! You have successfully drawn Doraemon using Python turtle. Through this step-by-step tutorial, we have explored how to use the turtle module to create graphics and draw a beloved character. Feel free to experiment further by adding additional details, colors, or even creating your own characters. Keep exploring and expanding your Python skills to unlock endless creative possibilities!
___________⬇⬇⬇⬇⬇⬇___________
from turtle import *
# Doraemon with Python Turtle
def ankur(x, y):
penup()
goto(x, y)
pendown()
def aankha():
fillcolor("#ffffff")
begin_fill()
tracer(False)
a = 2.5
for i in range(120):
if 0 <= i < 30 or 60 <= i < 90:
a -= 0.05
lt(3)
fd(a)
else:
a += 0.05
lt(3)
fd(a)
tracer(True)
end_fill()
def daari():
ankur(-32, 135)
seth(165)
fd(60)
ankur(-32, 125)
seth(180)
fd(60)
ankur(-32, 115)
seth(193)
fd(60)
ankur(37, 135)
seth(15)
fd(60)
ankur(37, 125)
seth(0)
fd(60)
ankur(37, 115)
seth(-13)
fd(60)
def mukh():
ankur(5, 148)
seth(270)
fd(100)
seth(0)
circle(120, 50)
seth(230)
circle(-120, 100)
def muflar():
fillcolor('#e70010')
begin_fill()
seth(0)
fd(200)
circle(-5, 90)
fd(10)
circle(-5, 90)
fd(207)
circle(-5, 90)
fd(10)
circle(-5, 90)
end_fill()
def nak():
ankur(-10, 158)
seth(315)
fillcolor('#e70010')
begin_fill()
circle(20)
end_fill()
def black_aankha():
seth(0)
ankur(-20, 195)
fillcolor('#000000')
begin_fill()
circle(13)
end_fill()
pensize(6)
ankur(20, 205)
seth(75)
circle(-10, 150)
pensize(3)
ankur(-17, 200)
seth(0)
fillcolor('#ffffff')
begin_fill()
circle(5)
end_fill()
ankur(0, 0)
def face():
fd(183)
lt(45)
fillcolor('#ffffff')
begin_fill()
circle(120, 100)
seth(180)
# print(pos())
fd(121)
pendown()
seth(215)
circle(120, 100)
end_fill()
ankur(63.56, 218.24)
seth(90)
aankha()
seth(180)
penup()
fd(60)
pendown()
seth(90)
aankha()
penup()
seth(180)
fd(64)
def taauko():
penup()
circle(150, 40)
pendown()
fillcolor('#00a0de')
begin_fill()
circle(150, 280)
end_fill()
def Doraemon():
taauko()
muflar()
face()
nak()
mukh()
daari()
ankur(0, 0)
seth(0)
penup()
circle(150, 50)
pendown()
seth(30)
fd(40)
seth(70)
circle(-30, 270)
fillcolor('#00a0de')
begin_fill()
seth(230)
fd(80)
seth(90)
circle(1000, 1)
seth(-89)
circle(-1000, 10)
# print(pos())
seth(180)
fd(70)
seth(90)
circle(30, 180)
seth(180)
fd(70)
# print(pos())
seth(100)
circle(-1000, 9)
seth(-86)
circle(1000, 2)
seth(230)
fd(40)
# print(pos())
circle(-30, 230)
seth(45)
fd(81)
seth(0)
fd(203)
circle(5, 90)
fd(10)
circle(5, 90)
fd(7)
seth(40)
circle(150, 10)
seth(30)
fd(40)
end_fill()
seth(70)
fillcolor('#ffffff')
begin_fill()
circle(-30)
end_fill()
ankur(103.74, -182.59)
seth(0)
fillcolor('#ffffff')
begin_fill()
fd(15)
circle(-15, 180)
fd(90)
circle(-15, 180)
fd(10)
end_fill()
ankur(-96.26, -182.59)
seth(180)
fillcolor('#ffffff')
begin_fill()
fd(15)
circle(15, 180)
fd(90)
circle(15, 180)
fd(10)
end_fill()
ankur(-133.97, -91.81)
seth(50)
fillcolor('#ffffff')
begin_fill()
circle(30)
end_fill()
# Doraemon with Python Turtle
ankur(-103.42, 15.09)
seth(0)
fd(38)
seth(230)
begin_fill()
circle(90, 260)
end_fill()
ankur(5, -40)
seth(0)
fd(70)
seth(-90)
circle(-70, 180)
seth(0)
fd(70)
ankur(-103.42, 15.09)
fd(90)
seth(70)
fillcolor('#ffd200')
# print(pos())
begin_fill()
circle(-20)
end_fill()
seth(170)
fillcolor('#ffd200')
begin_fill()
circle(-2, 180)
seth(10)
circle(-100, 22)
circle(-2, 180)
seth(180 - 10)
circle(100, 22)
end_fill()
goto(-13.42, 15.09)
seth(250)
circle(20, 110)
seth(90)
fd(15)
dot(10)
ankur(0, -150)
black_aankha()
if __name__ == '__main__':
screensize(800, 600, "#f0f0f0")
pensize(3)
speed(9)
Doraemon()
ankur(100, -300)
write('by Ankur Gajurel', font=("Haneenthecreate", 30, "bold"))
mainloop()
_____________________________________
For Easy copy
_____________________________________
Explanation(of above code to draw Doraemon with Python Turtle):
First Part ( 3 Body Parts inside functions ):
- In the first part of our code to Draw Doraemon, import the turtle module and start a function name “ankur” and give the parameters “x” and “y”. Then, call the penup() method and go to (x, y). And put the pen down.
- Now, start a function name “aankha”. Inside this function, fill the part with the color white as in “#ffffff”. Now start the fill and set the tracer to False. Then, set the value of the variable “a” to 2.5. Likewise, start a for loop with the range of 120. Inside this loop, check if “i” which loops from 0 to 120 falls under (0 – 30) or (60 – 90). If yes, subtract 0.5 from “a” and call the methods lt() and fd() with the arguments “3” and “a”. If no, add 0.5 tp “a” and call the methods lt() and fd() as above. Now, end the fill.
- Accordingly, start a function named “daari()” and call “ankur” with the arguments (-32, 135), the Seth method with the argument 165, and the fd() method with the argument 60. Likewise, do the same as above by changing the seth, fd, and the second argument of “ankur” as written in the code above.
Second Part ( Another 3 Body Parts ):
- Similarly, in the second part of our code to Draw Doraemon start a function mukh(). Inside this function, call the ankur() function with the arguments (5, 148). Likely, call the seth method with the argument “270” and fd() with “100”. Again, call the seth() method with 0 and draw a circle with the arguments “120, 100”. Then, call the seth(230) and circle(-120, 100).
- Likewise, start a function muflar(). Inside this function, fill the part with the color #e70010. Then, begin the fill and call the seth(0) and fd(200) and draw a circle(-5, 90). Similarly, call the fd() method with the argument 207 and circle(-5, 90) . And again, fd(10) and circle (-5, 90).
- Accordingly, start function name nak(). Inside this function, call the “ankur” function with the arguments (-10. 158) and seth(315). Then fill the part with the color #e70010 and begin the fill. As the nose is only one circle, draw a circle(20) and end the fill.
Third Part ( Last three Body Parts ):
- Likewise, start a function named black_aankha(). Inside this function, call the seth(0) and ankur with the arguments (-20, 195). Then, fill the part with the color #00000 ( black ) and begin the fill. Draw a circle(13) and end the first half. Now, set the pen size to 6 and call the “ankur” function with the arguments (20, 205), seth(75), circle(-10, 150), and set the pen size to 3. Again, call the “ankur” function with the arguments(-17, 200). Then, call seth(0), fill the part with #ffffff (white), and begin fill. Now, draw a circle(5) and end fill.
- Similarly, create a function name face() . Inside this function, call the fd(183), lt(45), fill with the color #ffffff (white) and begin the fill. Now, create a circle(120, 100), seth(180), fd(121) and put the down. Then, call seth(215), circle(120, 100), end the fill and call “ankur” with the arguments (63.56, 213.24). Likewise, call seth(90), aankha(), seth(180) and pick the pen up. Then, call fd(60), pendown(), seth(90), aankha(), penup(), seth(180) and fd(64).
- Now, create a function tauko(). Inside this function, call penup(), circle(150, 40), pendown() and fill the part with the color #00a0de. Then, begin the fill and draw a circle(150, 280) and end the fill.
Fourth Part (Doraemon whole body function):
- In this part, of “Draw Doraemon with python turtle”, create a function name Doraemon(). Everything in this part is coded inside this function. First, call the taauko() function, muflar() function, face() function, nak() function, mukh() function, daari() function and ankur() function with the arguments (0, 0)
- Now, call the seth(0),pick the pen up() and draw a circle(150, 50) and put the pen down. Likewise, call the seth() with the angle 30, fd(40), seth(70) and circle(-30, 270). Then, fill the part with the color #00a0de and begin the fill. Similarly, call the seth() with the value of angle 230, fd() with the value 80, seth with the angle 90, circle(1000, 1), again seth() with the angle -89 and circle(-1000, 10).
- Accordingly, call the seth() with the angle 180, fd() with the value 70, seth with the angle 90, circle(30, 180), again seth() with the angle 180 and fd() with the value 70.
- Then, call the seth with the angle 100 and circle(-1000, 9). Again, call the seth() method with the angle -86, circle(1000, 2), seth(230) and fd(40).
- Likewise, draw a circle(-30, 230), seth() method with the angle 45, fd() method with the value 81, seth(0) and fd(203). Now, draw a circle(5, 90), fd(10), circle(5, 90), fd() method with the value 7, seth() method with the angle 40. Similarly, draw a circle(150, 10), seth(30), fd(40) and end the fill.
- Now, call the seth(70) and fill the part with the color #ffffff (white) and begin the fill. Draw a circle with the value -3- and end the fill.
- Similarly, call the ankur() function with the arguments (103.74, -182.59) and fill the part with the color #ffffff (white) and begin the fill. Now, call the fd(15), circle(-15, 180), fd(90), circle(-15, 180), fd(10) and end the fill.
- Again, call the “ankur()” function with the arguments (-96.26, -182.59) and seth with the angle 180. Then, fill the part with color #ffffff (white) and begin the fill. Now, call the fd(15) and draw a circle(15, 180). Again call the fd(90), circle(15, 180) and fd(10) and end the fill.
- Accordingly, call the “ankur()” function with the arguments (-133.97, -91.81), seth() method with the angle 50, fill the part with the color white and begin the fill of circle(30) and end the fill.
- Now, again, call the “ankur” function with the arguments (-103.42, 15.09), seth() method with the angle 0, fd() with the value 38, again seth() with the angle 230 and begin the fill. Draw a circle(90, 260) and the fill.
- Call the ankur() function (5, -40), seth() method with angle of 0, fd() with the value 70, seth with the angle of -90, circle(-70, 180), again seth with 0 and at lat fd with the value 70.
- As this is the last code to Draw Doraemon with Python Turtle, call the “ankur()” function with the arguments (-103.42, 15.09), fd() with the value of 90, seth() method with the angle of 70. Fill the part with the color #ffd200 and begin the fill. Now, draw a circle(-20) and end the fill. Call the seth() method with the angle of 170 and full the part with the color #ffd200 and again begin the fill, Draw a circle(-2, 180), seth() method with the angle of 10. Now, draw 2 circles with the arguments (-100, 22) and (-1, 180) respectively. Then, call the seth() method with the angle of 90, circle(100, 22), and end the fill.
- Go to (-13.42, 15.09) and call the method seth() with the angle of 250. Draw a circle of (20, 110), seth with the angle of 90, fd() with the value of 15, dot() method with the value of 10. At last, ankur() function with the arguments (0, -150) and the black_aankha() function.
Last Part (Module Source File):
- Lastly, write the module source file code of the main program. i. e __name__ == “__main__” and set the screensize to (800, 600) and the background color to #f0f0f0. Set the pen size to 3 and set the speed to 9. Now, call the Doraemon() function and the ankur() function with the arguents (100, -300). Run the Tkinter event loop “mainloop()”.
Thank You for reading till the end. If you found something wrong in the post, please let us know using comments.
Keep Coding, Keep Learning

