STEP 7: Let's use the random image we've generated.

  • Go to and drag if inside the interval event.
  • Change the test variable to rand_img and change the test value to "shark".
  • Go to and drag Change Image inside the if statement. Make sure it has ········.
  • Change the name in front of the .load_image() command to fish. Change the image to "shark".

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)