Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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!), 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
Step: 1
Solution You can create the qualitycontrol function and use it in a program as described H...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