Question: A function to produce analysis. write and display all the analysis in a new CSV file ( analysis . txt ) , as in the
A function to produce analysis. write and display all the analysis in a new CSV file analysistxt as in the sample below. These analyses include:
average number of defects found per product type. use the following formula:
Average Defects per Product Type Total Defects for Product TypeTotal Production Entries for Product Type
a calculateaveragedefectsperproducttype and return a list of tuples containing the product type and its average defect count. As an example, the function should return Product AProduct BProduct C Ensure that the function handles cases where a product type has no defects, returning a zero average for that product type
b write the result in analysis.txt file as below
analyze the distribution of environmental impact categories in the provided dataset and display the percentages for each category.
To calculate the percentage of production entries falling into each environmental impact category low:CO medium: CO high: CO use the following formula:
Percentage of a category Number of entries in that category Total number of
entries
Count the number of machines with maintenance status as "Done" and "Not done".
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
