STEP 7: Let's set up the wizard's first response!

  • Change the string in .say() to "Definitely!".
  • Test your if statement! Keep clicking Run until rand_answer equals 1. The wizard should say "Definitely!"

Notice that if rand_answer is not 1, nothing happens. We'll need to write more code to change that!

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)