pygame.draw.rect(screen, BROWN, [60, 400, 30, 45])
Error:
Traceback (most recent call last):
File "<pyshell#3>", line 1, in <module>
pygame.draw.rect(screen, BROWN, [60, 400, 30, 45])
NameError: name 'pygame' is not defined
How to solve this error ?
if this is all you got, then you need to import pygame (if you have it installed).
import pygame
...
How to check if I have pygame installed ?
That's easy. Try to import it. If you get an error, then it's not installed.
C:\Users\this-guy\Documents\etc>python
Python 3.5.2 (v3.5.2:4def2a2901a5, Jun 25 2016, 22:01:18) [MSC v.1900 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import pygame
>>>