Sign InCoursewareNuggetsTutorials CoursesCodePad


Programming computer games is fun!

Pygame is a library that allows you to create computer games in Python.

Compared with turtle graphics, you can do even more cool stuff with pygame. For example, you can use it to play better animation, create booming sound, and make your game more interactive.

Installing Pygame

Unlike turtle graphics, which can be run in the CodePad from the browser, you need to install pygame and run it on your computer.

To install pygame, please follow these steps.

Installing Code Editor

You can use any editor to edit your code on your computer, but you will find it very helpful to get familiar with a code editor, such as Visual Studio Code. Visual Studio Code supports both Windows and Mac and it's free.

To install it, go to and follow the instructions.

Pygame Cheatsheet

You don't have to memorize every pygame instruction. Please check out the pygame cheatsheet and use that as a template to implement your own games.

© CS Wonders·About·Gallery·Fun Facts·Cheatsheet