import pygame ## This function defines our whole game, which is a very simple ## game. All it does is display a picture. def run_game(): ## Initialize the pygame submodules and set up the display window. pygame.init() width = 640 height = 480 my_win = pygame.display.set_mode((width,height)) ## The game loop starts here. keepGoing = True while (keepGoing): ## Handle events. for event in pygame.event.get(): if event.type == pygame.QUIT: keepGoing = False ###### START: This is the beginning of the part that you need to ###### look at for this first lab exercise. my_win.fill(pygame.color.Color("black")) pygame.draw.rect(my_win, pygame.color.Color('white'), (100,100,50,50)) pygame.draw.rect(my_win, pygame.color.Color('darkmagenta'), (140,140,70,40)) pygame.draw.circle(my_win, pygame.color.Color('navy'), (500,250),75) pygame.draw.line(my_win,pygame.color.Color('deeppink'),(50,320),(550,200)) pygame.draw.polygon(my_win,pygame.color.Color('darkgreen'), [(150,300),(150+80,300),(150+40,300+120)]) ###### END: This is the end of the part that you need to look at ###### for this first lab exercise. pygame.display.update() ## The game loop ends here. pygame.quit() ## Call the function run_game. run_game()