CS 0008: Fall 2013 Lab 11 Today will be bread and butter programming practice. Part 1========== There is a bug in debug.py. Please fix the bug. Trace the code to figure out what is wrong. You can use paper or add print statements to the code to trace it. Part II========= Suppose we have a nested list like this: pets = [["Shoji", "cat", 18], ["Hanako", "dog", 15], ["Sir Toby", "cat", 10], ["Sachiko", "cat", 7], ["Sasha", "dog", 3], ["Lopez", "dog", 13]] As you know, we can access the list elements with numbers, like this: >>> pets[0] ["Shoji", "cat", 18] We can also access elements of the inner lists. For example, the third element of the second element of list pets (the age of the dog ) is: >>> pets[1][2] 15 Below, we'll call a list like pets a "pet list". Write the following functions. Then, define function main that calls your functions on various test cases to verify that your functions work. 1. Write a function num_dogs that takes a pet list L as a parameter and returns the number of dogs in the list. 2. Write a function ages that takes a pet list L as a parameter and returns the sum of the ages of the animals in the list. Note that the ages is the third element of each inner list. Here is function grade for you to use in your main program: def grade(myAns,correctAnswer): if myAns == correctAnswer: print("Correct, the answer is",myAns) else: print("My answer is",myAns,"but the correct answer is",correctAnswer)