How to Solve NameError: name 'draw' is not defined -- pygame

Solution: Import the 'draw' module

To Solve the error, add the following line to the top of your code.

from pygame import draw

 

For more information:
Python pygame draw