the display surface to aid in performance any changes you make to the display surface actually happen in the background and will not be rendered onto the actual display that the user sees until you call the update(or flip(methods on the surface for examplepygame display update(pygame display flip(the update(method will redraw the display with all changes made to the display in the background it has an optional parameter that allows you to specify just region of the display to update (this is defined using rect which represents rectangular area on the screenthe flip(method always refreshes the whole of the display (and as such does exactly the same as the update(method with no parametersanother methodwhich is not specifically display surface methodbut which is often used when the display surface is createdprovides caption or title for the top level window this is the pygame display set_caption(function for examplepygame display set_caption('hello world'this will give the top level window the caption (or title'hello world events just as the graphical user interface systems described in earlier have an event loop that allows the programmer to work out what the user is doing (in those cases this is typically selecting menu itemclicking button or entering data etc )pygame has an event loop that allows the game to work out what the player is doing for examplethe user may press the left or right arrow key this is represented by an event event types each event that occurs has associated information such as the type of that event for examplepressing key will result in keydown type of eventwhile releasing key will result in keyup event type selecting the window close button will generate quit event type etc using the mouse can generate mousemotion events as well as mousebuttondown and mousebuttonup event types