Code Teacher

@RogerHaegg (0) • Palm Middle School
🚀 A Starter Guide to Pygame 📀
posted to Tutorials by eankeen

@eankeen
So, what I didn't realize, is that I had to go to the sample code in the repl at bottom of tutorial, save that image, and then upload the pic into my repl.
Now it does work. Thank you

🚀 A Starter Guide to Pygame 📀
posted to Tutorials by eankeen

New to Python and Pygame. I tried this with my students, but ended up getting message that it "Couldn't open dvd-logo-white.png ".
I saw a similar post that was commented to change png to PNG, but got same message. Below is what I believe is what the tutorial told us to use.
Any ideas?

import pygame
pygame.init()
width, height = 800, 600
backgroundColor = 255, 0, 0

screen = pygame.display.set_mode((width, height))
dvdLogo = pygame.image.load("dvd-logo-white.PNG")
dvdLogoRect = dvdLogo.get_rect()
while True:
screen.fill(backgroundColor)
screen.blit(dvdLogo, dvdLogoRect)
pygame.display.flip()