0
0
Software Engineeringknowledge~30 mins

Risk monitoring and control in Software Engineering - Mini Project: Build & Apply

Choose your learning style9 modes available
Risk Monitoring and Control
📖 Scenario: You are part of a software project team. You need to keep track of risks that might affect your project. Each risk has a description and a status showing if it is currently active or resolved.
🎯 Goal: Build a simple program to monitor risks by storing them, setting a threshold for active risks, filtering active risks, and displaying the active risks to help the team focus on important issues.
📋 What You'll Learn
Create a dictionary called risks with exact risk descriptions as keys and their status ('active' or 'resolved') as values.
Create a variable called active_threshold and set it to the number 2.
Use a dictionary comprehension to create a new dictionary called active_risks that contains only the risks with status 'active'.
Print the active_risks dictionary.
💡 Why This Matters
🌍 Real World
In real projects, teams track risks to avoid surprises. This simple program helps monitor which risks need attention.
💼 Career
Understanding how to organize and filter risk data is useful for project managers, DevOps engineers, and software team leads to keep projects on track.
Progress0 / 4 steps
1
Create the initial risk dictionary
Create a dictionary called risks with these exact entries: 'Server downtime': 'active', 'Data loss': 'resolved', 'Security breach': 'active', 'Budget overrun': 'resolved'.
Software Engineering
Need a hint?

Use curly braces to create a dictionary. Each entry has a risk description as a string key and its status as a string value.

2
Set the active risk threshold
Create a variable called active_threshold and set it to the number 2.
Software Engineering
Need a hint?

Just assign the number 2 to the variable named active_threshold.

3
Filter active risks using dictionary comprehension
Use a dictionary comprehension to create a new dictionary called active_risks that contains only the risks from risks where the status is 'active'.
Software Engineering
Need a hint?

Use {key: value for key, value in risks.items() if value == 'active'} to filter active risks.

4
Display the active risks
Write a print statement to display the active_risks dictionary.
Software Engineering
Need a hint?

Use print(active_risks) to show the filtered risks.