verifying installation of pygame code example
Example 1: how to install pygame in python
pip install pygame
Example 2: how to install pygame using pip in ubuntu
sudo apt-get install python-pygame
pip install pygame
sudo apt-get install python-pygame