Create a Pac-Man figure in Python

This code listing shows you how to create a Pac-Man figure in Python. For the purpose of this example, we did this in Visual Studio Code.

Code listing to create a Pac-Man figure in Python

Below is the code listing for this program.

from tkinter import *
root = Tk()
root.title('Pac-Man figure')
main = Canvas(root, bg='#d2e8fa', width=250, height=250)
coords = 25, 25, 200, 200
pacman = main.create_arc(coords, start=225, extent=270, outline='', fill='#e6e100')


Here is the output for the above program.

Create Pac-Man figure in Python - Techronology

Developer’s note

If you have any questions or comments, then send us an email at

Python page

Click on the button below to go to our Python page.

Python page

Create a menu in Python - Techronology

Python is a high-level computer programming language. If you want more information on Python, then visit Python Software Foundation.

Techronology home  Code library  Reference desk