0
0
Software Engineeringknowledge~30 mins

Risk analysis (probability and impact) in Software Engineering - Mini Project: Build & Apply

Choose your learning style9 modes available
Risk Analysis: Probability and Impact
📖 Scenario: You are part of a project team planning a new software product. To manage risks effectively, you need to list potential risks, assign their probability and impact scores, and then identify which risks need urgent attention.
🎯 Goal: Build a simple risk analysis table that shows each risk with its probability and impact scores, and then filter out the high-risk items that need immediate focus.
📋 What You'll Learn
Create a dictionary called risks with exactly these entries: 'Data loss': 0.3, 'Security breach': 0.6, 'Performance lag': 0.4, 'User error': 0.2, 'Hardware failure': 0.5
Create a dictionary called impact with exactly these entries: 'Data loss': 9, 'Security breach': 10, 'Performance lag': 6, 'User error': 3, 'Hardware failure': 7
Create a variable called threshold and set it to 4.0
Create a dictionary called high_risks that includes only risks where the product of probability and impact is greater than threshold
💡 Why This Matters
🌍 Real World
Risk analysis helps project teams focus on the most critical risks that could affect project success.
💼 Career
Understanding how to quantify and filter risks is essential for project managers, software engineers, and quality assurance professionals.
Progress0 / 4 steps
1
Set up the risk probabilities dictionary
Create a dictionary called risks with these exact entries: 'Data loss': 0.3, 'Security breach': 0.6, 'Performance lag': 0.4, 'User error': 0.2, 'Hardware failure': 0.5
Software Engineering
Need a hint?

Use curly braces {} to create the dictionary with the exact keys and values.

2
Set up the impact scores dictionary
Create a dictionary called impact with these exact entries: 'Data loss': 9, 'Security breach': 10, 'Performance lag': 6, 'User error': 3, 'Hardware failure': 7
Software Engineering
Need a hint?

Use a dictionary to map each risk to its impact score exactly as given.

3
Set the risk threshold value
Create a variable called threshold and set it to the float value 4.0
Software Engineering
Need a hint?

Just assign the number 4.0 to the variable named threshold.

4
Identify high-risk items
Create a dictionary called high_risks that includes only the risks where the product of probability from risks and impact from impact is greater than threshold. Use a dictionary comprehension with variables risk and prob iterating over risks.items().
Software Engineering
Need a hint?

Use a dictionary comprehension to filter risks where probability times impact is greater than threshold.