Fundamentals 7 min read

Draw the ‘What Is Peiqi?’ Mascot with Python Turtle – Full Code Walkthrough

This tutorial provides a complete Python‑turtle script that recreates the popular “What Is Peiqi?” movie mascot, explains each drawing step—from nose and eyes to body and tail—shows how to run the program, and displays the final illustration, all without any promotional content.

Test Development Learning Exchange
Test Development Learning Exchange
Test Development Learning Exchange
Draw the ‘What Is Peiqi?’ Mascot with Python Turtle – Full Code Walkthrough

This article presents a self‑contained Python‑turtle program that draws the mascot featured in the recent “What Is Peiqi?” movie advertisement. The script is written for Python 2, imports the turtle module as tu, and configures pen size, color mode, and canvas size before rendering each facial feature and body part.

Setup and Global Settings

#!/usr/bin/env python2
# coding=utf-8
import turtle as tu

tu.pensize(4)
tu.hideturtle()
tu.colormode(255)
tu.color((255, 155, 192), "pink")
tu.setup(840, 500)
tu.speed(10)

Drawing the Nose

# Nose
tu.pu()
tu.goto(-100, 100)
tu.pd()
tu.seth(-30)
tu.begin_fill()
a = 0.4
for i in range(120):
    if 0 <= i < 30 or 60 <= i < 90:
        a = a + 0.08
    else:
        a = a - 0.08
    tu.lt(3)   # turn left 3 degrees
    tu.fd(a)   # move forward by a step length
tu.end_fill()

Adding Details (Eyes, Mouth, Ears, etc.)

The script continues with a series of similar blocks that position the turtle, set colors, and draw circles or custom arcs for each component such as the eyes, ears, cheeks, mouth, body, arms, legs, and tail. Each part uses tu.begin_fill() and tu.end_fill() to create solid shapes, and the color palette switches between pink, white, black, red, and orange tones to match the original mascot.

Running the Program

Save the code as shashipeiqi.py and execute it with python shashipeiqi.py. The turtle window will open and sequentially render the full illustration. When the drawing finishes, tu.done() keeps the window open for viewing.

Result

The final output looks like the following image, which reproduces the mascot’s distinctive pink‑cheeked face, round eyes, and stylized body.

Peiqi mascot drawn with Python turtle
Peiqi mascot drawn with Python turtle

The article’s sole purpose is to demonstrate how to use the turtle graphics library for complex vector drawings, making it a useful reference for beginners learning Python graphics programming.

Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

Code Examplegraphics programmingturtle graphicsdrawing tutorialpeiqi mascot
Test Development Learning Exchange
Written by

Test Development Learning Exchange

Test Development Learning Exchange

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.