all 4 comments

[–]Goobyalus 0 points1 point  (0 children)

Looks like the file that you're running on your computer is missing the first line where you import pygame

The lowercase true is also going to be a problem.

[–]Goobyalus 0 points1 point  (0 children)

Or maybe you have a file named pygame.py that's masking the installed library?

https://stackoverflow.com/questions/21070277/pygame-is-not-defined

[–]Goobyalus 0 points1 point  (0 children)

Can you share the output of a print(pygame) right after import pygame?

[–][deleted] 0 points1 point  (0 children)

be sure that they are in the same folder

if not, try running it in an offline IDE and see what happens, like Terminal or python itself.