STEP 17: Using the information we have in our function, let's use logic to figure out if our animal is a mammal.

  • From , drag if and inside and to the bottom of classify_animal().
  • Change choice1 == "yes" to has_hair and choice2 == "no" to warm_blooded.
  • In , drag String Variable indented inside the if statement.
  • Finally, change my_var to animal_class and "This is a string." to "mammal".

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)