Complete the code to calculate the percentage of lines covered by tests.
coverage_percentage = (covered_lines / [1]) * 100
The total number of lines in the code is used as the denominator to calculate coverage percentage.
Complete the code to filter out functions that have zero coverage.
functions_with_coverage = {f: c for f, c in coverage_data.items() if c > [1]Functions with coverage greater than zero are considered covered.
Fix the error in the code to calculate branch coverage correctly.
branch_coverage = (covered_branches / [1]) * 100
Branch coverage is the ratio of covered branches to total branches.
Fill both blanks to create a dictionary of functions with coverage above 80%.
high_coverage_funcs = {f: c for f, c in coverage_data.items() if c [1] [2]The code filters functions with coverage greater than 80%.
Fill all three blanks to create a summary dictionary with function names in uppercase and coverage above 50%.
summary = { [1]: [2] for func, cov in coverage_data.items() if cov [3] 50 }The dictionary comprehension uses uppercase function names, coverage values, and filters coverage greater than 50%.