Complete the code to calculate defect density given total defects and size.
defect_density = total_defects / [1]Defect density is calculated as total defects divided by the size of the software (e.g., lines of code).
Complete the code to calculate defect detection rate given defects found and total defects.
detection_rate = defects_found / [1]Defect detection rate is the ratio of defects found to total defects present.
Fix the error in the code to calculate defect density correctly.
defect_density = [1] / sizeThe numerator should be total defects, not size or other values, to calculate defect density.
Fill both blanks to calculate defect detection rate as a percentage.
detection_rate = ([1] / [2]) * 100
Defect detection rate is defects found divided by total defects, multiplied by 100 to get percentage.
Fill all three blanks to create a dictionary with defect density and detection rate.
metrics = {"density": [1] / [2], "detection": ([3] / total_defects) * 100}The dictionary calculates defect density as total defects over size, and detection rate as defects found over total defects times 100.