PyGame usually comes installed with the latest Raspbian distribution, but if it isn't you can use the following command to install it:
sudo apt-get install python-pygame
Test your installation by opening a Python terminal by entering
python in a regular terminal and pressing Enter. Now, execute the following command:
Now that you have your system set up and you have hopefully checked out the PyGame website to explore its complete functionalities, we will move on to build the binary fractal tree to introduce you to the workings of PyGame. Let's begin!