WARNING: This program has a bug, which means we need to debug it! This program has a logic error.

  • Click Run and type rock into the pop up box.
  • Look at the code the editor and the stage to find the logic error. It's displaying the wrong result!
  • Rock beats scissors! Debug the program so that the text shows the correct winner.
  • Change the correct result text to "Player wins!" to fix the bug.

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)