Complete the code to define the risk level based on impact.
risk_level = 'High' if impact [1] 7 else 'Low'
The risk level is 'High' when the impact is greater than or equal to 7.
Complete the code to calculate risk priority by multiplying probability and impact.
risk_priority = probability [1] impactRisk priority is calculated by multiplying probability and impact to reflect combined effect.
Fix the error in the risk assessment function to return correct risk level.
def assess_risk(probability, impact): if probability [1] 0.7 and impact >= 7: return 'High' else: return 'Low'
The function checks if probability is greater than or equal to 0.7 to assess high risk.
Fill both blanks to create a dictionary comprehension that maps test cases to risk levels based on priority.
risk_map = {test_case: 'High' if priority [1] 50 else 'Low' for test_case, priority in test_priorities.items() if priority [2] 10}The comprehension assigns 'High' risk if priority is at least 50 and includes only priorities less than 10 in the dictionary.
Fill all three blanks to create a filtered dictionary of test cases with risk priority above threshold and label them.
filtered_risks = { [1]: priority for [2], priority in risks.items() if priority [3] threshold }The dictionary comprehension uses 'test_case' as key, 'test_case' as loop variable, and filters priorities greater than threshold.