STEP 19: Let's change our last if statement in classify_animal() to see whether the animal is a shark or an eel!

The identity operator is can be another way to test if two values are equal.

  • Change the first string in your if statement from "yes" to "shark" and the second string from "y" to "eel".
  • Then, change my_var inside your if statement to animal_class and "This is a string." to "fish".
  • Let's practice using is! In your final if statement change both occurrences of == to is.

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)