in the previous animation programa call to time sleep( would slow down the program so that the program doesn' run too fast the problem with time sleep()is that might be too much of pause on slow computers and not enough of pause on fast computers pygame time clock object can pause an appropriate amount of time on any computer line calls mainclock tick( inside the game loop this call to the clock object' tick(method waits enough time so that it runs at about iterations secondno matter what the computer' speed is this ensures that the game never runs faster than you expect call to tick(should only appear once in the game loop setting up the window and data structures set up the bouncer and food data structures foodcounter newfood foodsize lines to set up few variables for the food blocks that appear on the screen foodcounter will start at the value newfood at and foodsize at bouncer {'rect':pygame rect( )'dir':upleftline sets up new data structure called bouncer bouncer is dictionary with two keys the 'rectkey has pygame rect object that represents the bouncer' size and position the 'dirkey has direction that the bouncer is currently moving the bouncer will move the same way the blocks did in ' animation program foods [ for in range( ) foods append(pygame rect(random randint( windowwidth foodsize)random randint( windowheight foodsize)foodsizefoodsize)the program will keep track of every food square with list of rect objects in foods lines and create twenty food squares randomly placed around the screen you can use the random randint(function to come up with random xy coordinates on line we will call the pygame rect(constructor function to return new pygame rect object it will represent the position and size of the food square the first two parameters for pygame rect(are the xy coordinates of the top left corner you want the random coordinate to be between and the size of the window minus the size of the food square if you had the random