Question: Write a new function sound 2 ( weight , is _ cat ) that takes in not only the weight of the pet, but also
Write a new function soundweight iscat that takes in not only the weight of the pet, but also a boolean value iscat.
If iscat is False, then the pet in question is a dog, so sound should call the sound function from Part A and return whatever sound returns.
However, if iscat is True, then the pet being tested is a cat, so sound should just return the string 'Meow' regardless of the weight.
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
