Question: Python Create a function named rate_animal that will rate the value of animals on a numeric scale (1-4). Your function should consume a string named
Python

Create a function named rate_animal that will rate the value of animals on a numeric scale (1-4). Your function should consume a string named an_animal and return an integer from 1-4 for each of four possible inputs: "dog", "cat", "capybara", and "danger noodle". Each animal should have its own value. If the string given is not a valid animal from the list, return -1.Call and print the function once with your favored animal
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
