The code is
import pygame #imports pygame import time #imports time import random #imports random pygame.init #initializes pygame green = (0, 255, 0) #set green