Copy the two images below into the folder you have saved your code file
— NOTE: Make sure you use the correct files names
Now add the following code
# Create a Background_Image variable
# background
BACKGROUND_IMAGE = pygame.image.load('background.jpg')
##########################################################
## ##
## Replace this with Code from Step THREE-A ##
## ##
##########################################################
# Create the Game Block
# - set running = True
running = True
##########################################################
## ##
## Replace this with Code from Step SIX-B ##
## ##
##########################################################
# - Start While running Iteration
while running:
# - Draw the screen\
SCREEN.fill((0, 0, 0))
# - Display the background Image
# display the background image
SCREEN.blit(BACKGROUND_IMAGE, (0, 0))
##########################################################
## ##
## Replace this with Code from Step SEVEN-B ##
## ##
##########################################################
#- Check for quitting
for event in pygame.event.get():
# check for closing window
if event.type == pygame.QUIT:
running = False
##########################################################
## ##
## Replace this with Code from Step THREE-B ##
## ##
##########################################################
# - Update the display
# Update the display after each iteration of the while loop
pygame.display.update()
##########################################################
## ##
## Replace this with Code from Step FOUR-B ##
## ##
##########################################################
# - Program Quit
# Quit the program
pygame.quit()
Run your code
You should see a screen like this