This is the code that I am working with:
import pygame global lead_x global lead_y global lead_x_change global lead_y_change lead_x = 300 lead_y = 300 lead_x_c
If you need to modify a global variable from inside a function you need to use the global keyword: global lead_x in this case, before any assignment