0
0
SCADA systemsdevops~10 mins

Compliance reporting in SCADA systems - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to generate a compliance report header.

SCADA systems
report_header = "Compliance Report - [1]"
Drag options to blanks, or click blank then click option'
AReport
B2023-04-01
CApril 2023
DSystem
Attempts:
3 left
💡 Hint
Common Mistakes
Using just the year without month
Using a generic word like 'Report' instead of a date
2fill in blank
medium

Complete the code to filter logs for compliance checks.

SCADA systems
filtered_logs = [log for log in logs if log['[1]'] == 'ERROR']
Drag options to blanks, or click blank then click option'
Astatus
Blevel
Ctype
Dmessage
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'status' which might not indicate severity
Using 'message' which is the log text, not the level
3fill in blank
hard

Fix the error in the code to generate a compliance summary.

SCADA systems
summary = {key: len([entry for entry in data if entry['status'] == '[1]']) for key in categories}
Drag options to blanks, or click blank then click option'
Acompliant
BCompliant
CCOMPLIANT
Dcompliance
Attempts:
3 left
💡 Hint
Common Mistakes
Using uppercase or capitalized versions that don't match data
Using unrelated words like 'compliance'
4fill in blank
hard

Fill both blanks to create a dictionary of non-compliant devices and their error counts.

SCADA systems
non_compliant = {device['[1]']: device['[2]'] for device in devices if device['status'] == 'non-compliant'}
Drag options to blanks, or click blank then click option'
Aid
Berror_count
Cname
Dstatus
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'name' as key which might not be unique
Using 'status' as value which is the same for all filtered devices
5fill in blank
hard

Fill all three blanks to generate a report dictionary with device names, error counts, and compliance status.

SCADA systems
report = [1](device['[2]']: {'errors': device['[3]'], 'status': device['status']} for device in device_list)
Drag options to blanks, or click blank then click option'
Adict
Bname
Cerror_count
Did
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'id' as key instead of 'name'
Not using dict() to create the dictionary