Question: 2 9 . 3 ) Animal Rater Create a function named rate _ animal that will rate the value of different animals on a numeric
Animal Rater
Create a function named rateanimal that will rate the value of different
animals on a numeric scale where is best and is worst Your function
should consume a variable named animal that represents the type of animal as a
string, and return an integer from for each of four respective inputs:
"dog", "cat", "capybara", and "danger noodle". Each animal should have
its own value. If the string given is not one of these animals, return
Use your function to print out the rating for your favorite animal. You should
consider writing unit tests, but you are not required to do so
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
