We need to use the global keyword to make changes to some of our variables inside the event.

  • Go to and drag Global Variable into the event, right after the line that defines (def) the event.
  • Change the global variable name to score.
  • Drag another Global Variable inside the collision event and change the variable to left_count.
  • Drag a third Global Variable inside the event and change the variable to down_count.

To navigate the page using the TAB key, first press ESC to exit the code editor.

# THIS ACTIVITY IS IN PREVIEW ONLY MODE
  • Run Code
  • Submit Work
  • Next Activity
  • Show Console
  • Reset Code Editor
  • Codesters How To (opens in a new tab)