Question: In lab 7 _ p 7 . py two lists are created with integer number values that represent the number of cats and dogs in
In labppy two lists are created with integer number values that represent the number of cats and dogs in
a network of animal shelters around Charlotte. Complete the program to perform the following tasks:
Sort the cats list into decreasing order
Ask the user for the number of cats a new shelter has and add the value as a new element at position with
index in the cats list increasing the number of elements in cats by one
Ask the user for the number of dogs a new shelter has and add the value as the first element in the dogs
list increasing the number of elements in dogs by one
Create the list pets which contains the sums of the corresponding values in the lists cats and dogs
Find the total number of pets across the whole network of animal shelters
Display the pets list
Your output might look something like this:
Enter the number of cats for the new shelter:
Enter the number of dogs for the new shelter:
cats in each shelter:
dogs in each shelter:
Pets in each shelter:
Pets in all shelters
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
