WARNING: This program counts the number of times a user clicks on the pig sprite, but it has a syntax error!

RULE: To use and change variables that were created earlier in the program in an event, we need to use the keyword global followed by the variable name that we would like to use inside of the event.

  • Click Run and click on the pig. Read the error message.
  • Use a Global Variable in the event so that 1 is added to clicks each time you click on the pig.

# THIS ACTIVITY IS IN PREVIEW ONLY MODE