the pygame display update(function draw the window onto the screen pygame display update(in pygamenothing is actually drawn to the screen until the pygame display update(function is called this is because drawing to the screen is slow compared to drawing on the surface objects in the computer' memory you do not want to update to the screen after each drawing function is calledbut only update the screen once after all the drawing functions have been called events and the game loop in previous gamesall of the programs print everything immediately until they reach input(function call at that pointthe program stops and waits for the user to type something in and press enter but pygame programs are constantly running through loop called the game loop in this programall the lines of code in the game loop execute about hundred times second the game loop is loop that constantly checks for new eventsupdates the state of the windowand draws the window on the screen events are objects of the pygame event event data type that are generated by pygame whenever the user presses keyclicks or moves the mouseor makes some other event occur (these events are listed on table - run the game loop while trueline is the start of the game loop the condition for the while statement is set to true so that it loops forever the only time the loop exits is if an event causes the program to terminate the pygame event get(function for event in pygame event get()if event type =quitcalling pygame event get(retrieves any new pygame event event objects (called event objects for shortthat have been generated since the last call to pygame event get(these events are returned as list of event objects all event objects have an attribute called type which tell us what type of event it is (in this we only deal with the quit types of event the other types of events are covered in the next post questions to