📖 Scenario: You work in a factory that uses a SCADA system to monitor machines. You want to create a simple dashboard that shows key performance indicators (KPIs) like uptime, production count, and error count for each machine.
🎯 Goal: Build a basic KPI dashboard data structure, add a configuration for alert thresholds, calculate which machines exceed error limits, and display the results.
📋 What You'll Learn
Create a dictionary called machines with exact machine names and their KPI values
Add a variable called error_threshold with the value 5
Use a for loop with variables machine and kpis to find machines with errors above error_threshold
Print the list of machines exceeding the error threshold exactly as shown
💡 Why This Matters
🌍 Real World
Factories use SCADA systems to monitor machine health and production. KPI dashboards help operators quickly see which machines need attention.
💼 Career
DevOps and automation engineers often create monitoring dashboards and alerts to keep systems running smoothly and prevent downtime.
Progress0 / 4 steps
1
Create the initial KPI data
Create a dictionary called machines with these exact entries: 'MachineA': {'uptime': 98, 'production': 1500, 'errors': 3}, 'MachineB': {'uptime': 95, 'production': 1200, 'errors': 7}, 'MachineC': {'uptime': 99, 'production': 1600, 'errors': 2}
SCADA systems
Hint
Use a dictionary with machine names as keys and another dictionary for their KPIs as values.
2
Add error threshold configuration
Add a variable called error_threshold and set it to 5
SCADA systems
Hint
This variable will help us check which machines have too many errors.
3
Find machines exceeding error threshold
Use a for loop with variables machine and kpis to create a list called high_error_machines containing machine names where kpis['errors'] is greater than error_threshold
SCADA systems
Hint
Check each machine's errors and add the machine name to the list if errors are above the threshold.
4
Display machines with high errors
Write a print statement to display the list high_error_machines exactly as: Machines with high errors: ['MachineB']
SCADA systems
Hint
Use an f-string to format the output exactly as shown.
Practice
(1/5)
1. What is the main purpose of a KPI dashboard in a SCADA system?
easy
A. To generate detailed reports for auditors
B. To store raw sensor data for later analysis
C. To control machine operations automatically
D. To display key performance indicators clearly and quickly
Solution
Step 1: Understand the role of KPI dashboards
KPI dashboards focus on showing important numbers that reflect system performance.
Step 2: Differentiate from other SCADA functions
Storing data, controlling machines, and generating reports are different tasks from displaying KPIs.
Final Answer:
To display key performance indicators clearly and quickly -> Option D
Quick Check:
KPI dashboard = clear key numbers [OK]
Hint: KPI dashboards show key numbers fast and clear [OK]
Common Mistakes:
Confusing dashboards with data storage
Thinking dashboards control machines
Mixing dashboards with report generation
2. Which of the following is the correct way to highlight a KPI value that is below target using color in a dashboard?
easy
A. Use red color for values below target
B. Use yellow color for values below target
C. Use blue color for values below target
D. Use green color for values below target
Solution
Step 1: Understand color conventions in KPI dashboards
Red usually signals a problem or below target performance.
Step 2: Match color to KPI status
Green means good, red means bad, so below target should be red.
Final Answer:
Use red color for values below target -> Option A
Quick Check:
Below target = red color [OK]
Hint: Red means below target or problem [OK]
Common Mistakes:
Using green for bad performance
Choosing blue which is neutral
Using yellow which means caution, not failure
3. Given a SCADA KPI dashboard showing machine uptime percentages: Machine A = 95%, Machine B = 88%, Machine C = 92%. If the target uptime is 90%, which machines should be highlighted in red?
medium
A. Machine B only
B. Machine A and Machine C
C. Machine A only
D. Machine B and Machine C
Solution
Step 1: Compare each machine's uptime to the target
Only Machine B is below the 90% target and should be highlighted in red.
Final Answer:
Machine B only -> Option A
Quick Check:
Below 90% uptime = red highlight [OK]
Hint: Highlight only below target values in red [OK]
Common Mistakes:
Highlighting machines above target
Including machines that meet or exceed target
Ignoring the target threshold
4. You created a KPI dashboard but the color coding does not change when values go below target. What is the most likely cause?
medium
A. The data source is missing some sensor readings
B. The dashboard layout is too complex
C. The color rules are not linked to the KPI values correctly
D. The target values are set too high
Solution
Step 1: Check the color coding logic
If colors do not change, the rules linking KPI values to colors are likely not set or connected properly.
Step 2: Rule out other causes
Layout complexity or missing data won't directly stop color changes; target values affect performance but not color logic.
Final Answer:
The color rules are not linked to the KPI values correctly -> Option C
Quick Check:
Color rules linked properly = color changes [OK]
Hint: Check color rule connections first when colors don't update [OK]
Common Mistakes:
Blaming layout instead of logic
Assuming missing data causes color issues
Thinking target values affect color coding directly
5. You want to design a KPI dashboard for a SCADA system that shows temperature, pressure, and flow rate KPIs. Which layout approach best supports quick understanding?
hard
A. Display all raw sensor data in a large table with no colors
B. Arrange KPIs in a simple grid with clear labels and color-coded status
C. Show only the average values without any target or color indicators
D. Use multiple pages with detailed charts for each KPI
Solution
Step 1: Identify best practices for KPI dashboard layout
Simple grids with clear labels and color coding help users quickly see status and compare KPIs.
Step 2: Evaluate other options
Raw data tables, averages without targets, or multi-page charts reduce clarity and speed of understanding.
Final Answer:
Arrange KPIs in a simple grid with clear labels and color-coded status -> Option B
Quick Check:
Simple, clear, color-coded layout = fast understanding [OK]
Hint: Use simple grids and colors for fast KPI reading [OK]
Common Mistakes:
Showing raw data instead of KPIs
Omitting targets and colors
Splitting KPIs across many pages
Recommended
Ready to prove it?
Pass the test and this pattern moves unknownstrongwhile earning +1 Grip toward your certificate.