instalation pip gygame code example
Example 1: install pygame
python3 -m pip install pygame <<<(mac)>>>
or
python -m pip install pygame <<<(windows)>>>
or
sudo apt install python3-pygame <<<(ubuntu)>>>
Example 2: how to set up pygame
import pygame
import os
import sys
import random
pygame.init()
screen = pygame.display.set_mode((800, 500))