Draw Panda Using Turtle Graphics in Python

18 Jan, 2022
Turtle is an inbuilt module in Python. It provides: 
Drawing using a screen (cardboard).Turtle (pen).
Drawing using a screen (cardboard).
Turtle (pen).
To draw something on the screen, we need to move the turtle (pen), and to move the turtle, there are some functions like the forward(), backward(), etc.
Prerequisite: Turtle Programming Basics 
In this section, we will discuss how to draw a Panda using Turtle Graphics. 
Approach: 
Import Turtle.Make Turtle Object.Define a method to draw a circle with dynamic radius and color.Draw ears of Panda with black color circles.Draw face of Panda with white color circle.Draw eyes of Panda with black and white color concentric circles.Draw nose of Panda with black color circle.Draw two semicircle for mouth below nose.
Import Turtle.
Make Turtle Object.
Define a method to draw a circle with dynamic radius and color.
Draw ears of Panda with black color circles.
Draw face of Panda with white color circle.
Draw eyes of Panda with black and white color concentric circles.
Draw nose of Panda with black color circle.
Draw two semicircle for mouth below nose.
Code: 
python3
# Draw a Panda using Turtle Graphics# Import turtle packageimport turtle # Creating a turtle object(pen)pen = turtle.Turtle() # Defining method to draw a colored circle# with a dynamic radiusdef ring(col, rad):     # Set the fill    pen.fillcolor(col)     # Start filling the color    pen.begin_fill()     # Draw a circle    pen.circle(rad)     # Ending the filling of the color    pen.end_fill() ##########################Main Section############################# # pen.up             --> move turtle to air# pen.down           --> move turtle to ground# pen.setpos         --> move turtle to given position# ring(color, radius) --> draw a ring of specified color and radius################################################################### ##### Draw ears ###### Draw first earpen.up()pen.setpos(-35, 95)pen.downring('black', 15) # Draw second earpen.up()pen.setpos(35, 95)pen.down()ring('black', 15) ##### Draw face #####pen.up()pen.setpos(0, 35)pen.down()ring('white', 40) ##### Draw eyes black ##### # Draw first eyepen.up()pen.setpos(-18, 75)pen.downring('black', 8) # Draw second eyepen.up()pen.setpos(18, 75)pen.down()ring('black', 8) ##### Draw eyes white ##### # Draw first eyepen.up()pen.setpos(-18, 77)pen.down()ring('white', 4) # Draw second eyepen.up()pen.setpos(18, 77)pen.down()ring('white', 4) ##### Draw nose #####pen.up()pen.setpos(0, 55)pen.downring('black', 5) ##### Draw mouth #####pen.up()pen.setpos(0, 55)pen.down()pen.right(90)pen.circle(5, 180)pen.up()pen.setpos(0, 55)pen.down()pen.left(360)pen.circle(5, -180)pen.hideturtle()
Output:
arorakashish0911
Python-turtle
Python
Writing code in comment?
Please use ide.geeksforgeeks.org,
generate link and share the link here.
How to Install PIP on Windows ?
*args and **kwargs in Python
Python Classes and Objects
Introduction To PYTHON
Python OOPs Concepts
Convert integer to string in Python
Python | os.path.join() method
Create a Pandas DataFrame from Lists
How to drop one or multiple columns in Pandas Dataframe
How To Convert Python Dictionary To JSON?