Upload an image to your sandbox editor so you can refer to it in your project.
Go to the Sandbox environment.
Click on the three dots next to Project to see file options.
Click Add >> File (image). Then upload the image from your computer.
4. Then 'Save' to save the image with the project.
To display the image file to the results panel, try entering the following code. Replace 'background.png' with the name of the image file. Then select your run file and run.
width = 600
height = 400
screen = pygame.display.set_mode((width, height))
isPlaying = True
background = pygame.image.load(os.path.join(os.path.dirname(__file__), 'background.png'))
screen.blit(background, (0, 0))
for event in pygame.event.get():
if event.type == pygame.QUIT:
isPlaying = False
*If you are trying to see the updated output and are not able to see it, make sure to close the screen window first before running the code.