Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started