• Click Run. Then click the star and read the error message.
  • Debug the program so that the click number increases by 1 each time you click on the star.

To change the variable click_num inside our event, we need to use the keyword global.

Remember, the error message won't appear until you click the star.

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)