STEP 10: Let's start writing our classify_animal function!

  • Remember, this function returns the animal's class as a string. We should create a variable in which to store it.
  • In , drag String Variable indented inside classify_animal().
  • Change the variable to the left of the = sign from my_var to animal_class.
  • Finally, change "This is a string" to "unknown", since we at first don't know the animal's classification.

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)