Question: Python 3.x Starter Code def findMin(alist): ''' Returns the minimum value of a given list of numbers :param alist: a list of numbers; must not
Python 3.x

Starter Code
def findMin(alist): ''' Returns the minimum value of a given list of numbers :param alist: a list of numbers; must not be empty! :return: the smallest number in the given list ''' min_i = 0 for i in range(1,len(alist)): a_num = alist[i] min_val = alist[min_i] if (min_val return result def min_lists(a_list_of_lists): ''' Returns the list containing the minimum value :param alist: a list of lists of numbers; must not be empty! :return: the list in the list of lists with the smallest value ''' min_i = 0 for i in range(len(a_list_of_lists)-1): a_list = a_list_of_lists[min_i] min_list = findMin(a_list_of_lists[min_i]) if (min_list return result
Question 2 (12 points) Purpose: To practice testing and debugging code that someone else wrote. Degree of Difficulty: Moderate In the document a8q2 functions.py you'll find two functions: . findMin) Returns the minimum value of a given list of numbers. min_lists): Returns the list containing the minimum value These functions contain errors. Your task will be to find the errors using testing. Ordinarily. you would simply fix the errors, but in this question, you will explain what the errors are. You will not need to hand in the corrected code Part of the exercise is figuring out what the code is supposed to do (based on the documentation)! 1 Write white-box and black-box tests for the function findMin. You should do this without Python, either on paper, or in a simple document. Don't worry about implementing your tests or test-driver until you have thought about which tests you want. Make sure you have at least 3 black-box tests, and 3 white-box tests, as a minimum. More tests may be useful. 2. Impleme nt your test cases in a document named a8q2.testing.py. You can use either plainif-statements t your test driver (as demon- 3. Run your tests, and copy/paste the console output to a document named a8q2_output.txt. The 4. Try to deduce the problem with the findMin) function from the output of your testing. Then fix the 5. In the document a8q2_output.txt, describe the error(s) you found, and how you fixed it (them). You (as demonstrated in readings 15.2.4) or a list-of-dictionaries to i strated in class during chapter 15 exercise 3). console output you hand in should come from the program before you try to fix it! error(s) in the function! do not need to write a lot: a sentence or two for each error is all we want. Write your explanation as if you are explaining the error to a colleague of yours who wrote the functions. 6. Repeat the above steps for the second function, min_listsO
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
