Question: A manufacturing facility stores quality assurance data in a list (though they should be using a dictionary!), with the item name and a quality

A manufacturing facility stores quality assurance data in a list (though they should be using a dictionary!),

A manufacturing facility stores quality assurance data in a list (though they should be using a dictionary!), with the item name and a quality control score (an integer percentage from 0-100). Your job is to identify items that fall below a given threshold value. Write a function quality control() with two parameters, a list and a threshold value. This function prints the name of every item that falls below the threshold, and then returns the number of items that failed. As you loop through the list, you will only need to check the quality score values, which are guaranteed to be stored in odd indices. Use the function in a program that reads a threshold value, the number of items, and then the list of items. Remember there are 2 values (the name and the quality score) for each item. Ex: If the inputs are: 80 4 'CPU chip' 78 'CPU2' 99 lego set! 88 'laptop' 56 the function returns: 'CPU chip' laptop' 2 failed. Your program must define and call the following function: def quality control (qa_list, thresh) 3621762421020

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

Solution You can create the qualitycontrol function and use it in a program as described H... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!