Racey – Display Images

Save the following image (racecar.png) into your project folder (you probably called it Racey)
– be sure to name the image file racecar.png

STEP Two – A

black = (0,0,0)
white = (255,255,255)
 
##########################################################
##                                                      ##
##      Replace this with Code from Step FOUR-A         ##
##                                                      ##
##########################################################

STEP Two – B

carImg = pygame.image.load('racecar.png')
 
def car(x,y):
    gameDisplay.blit(carImg, (x,y))
 
##########################################################
##                                                      ##
##      Start point for Step FIVE-B                     ##
##                                                      ##
##########################################################
 
x =  (display_width * 0.45)
y = (display_height * 0.8)
 
##########################################################
##                                                      ##
##      Replace this with Code from Step THREE-A        ##
##                                                      ##
##########################################################

STEP Two – C

##########################################################
##                                                      ##
##      Replace this with Code from Step THREE-B        ##
##                                                      ##
##########################################################
 
    gameDisplay.fill(white)
    car(x,y)
 
##########################################################
##                                                      ##
##      Replace this with Code from Step FOUR-C         ##
##                                                      ##
##########################################################

Run your code

You should now see a white screen with a race car.