NameError

Joel Goldstick joel.goldstick at gmail.com
Wed Nov 23 21:53:57 EST 2016


On Wed, Nov 23, 2016 at 9:44 PM, Cai Gengyang <gengyangcai at gmail.com> wrote:
>>>> pygame.draw.rect(screen, BROWN, [60, 400, 30, 45])
> 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 ?
> --
> https://mail.python.org/mailman/listinfo/python-list

have you imported pygame?

-- 
Joel Goldstick
http://joelgoldstick.com/blog
http://cc-baseballstats.info/stats/birthdays



More information about the Python-list mailing list