import the pygame library import pygame initialize the pygame library pygame init(create window screen pygame display set_mode(( , )pygame display set_caption('first pygame game'initialize game objects in this step we load imagesload soundsdo object positioningset up some state variablesetc start the game loop it is just loop where we continuously handle eventschecks for inputmove objectsand draw them each iteration of the loop is called frame