Question: Step 2 : There are several improvements which could be made to this program. For each recom - mended improvement below, modify the code to
Step : There are several improvements which could be made to this program. For each recom mended improvement below, modify the code to implement the improvement.
Currently, the program expects the user to enter a lowercase y when the pet has been spayed or neutered. It would be better to permit the user to enter either a lowercase y or an uppercase Y Using the logical OR operator, modify the conditional expressions of the ifelse statements which compare variable spayed to y so the conditional expressions will check for either y or Y
Currently, when an animal other than a cat or dog is entered such as a javelina the program asks if the animal has been spayed or neutered before displaying the message that only cats and dogs need pet tags. Determine and implement a way to make the program only execute the spayneuter prompt and input when the pet type is cat or dog, but not when the pet type is something else.
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
