Complete the code to calculate the defect density.
defect_density = total_defects / [1]Defect density is calculated as the number of defects divided by the total lines of code.
Complete the code to calculate test execution progress percentage.
progress = (executed_tests / [1]) * 100
Progress is the ratio of executed tests to total tests, multiplied by 100 for percentage.
Fix the error in the code to calculate test pass rate.
pass_rate = (passed_tests / [1]) * 100
Pass rate is the percentage of passed tests out of executed tests, not total tests.
Fill both blanks to calculate defect removal efficiency.
defect_removal_efficiency = (defects_found_in_testing / [1]) * [2]
Defect removal efficiency is defects found in testing divided by total defects, multiplied by 100 for percentage.
Fill all three blanks to create a dictionary of test metrics with conditions.
metrics = {test + [1]: result for test, result in test_results.items() if result [2] [3]This dictionary comprehension creates a dictionary of test IDs and results only for tests that passed.