0
0
SCADA systemsdevops~10 mins

Data quality flags 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 set the data quality flag to 'GOOD' when the sensor reading is valid.

SCADA systems
if sensor_reading_valid:
    data_quality_flag = '[1]'
Drag options to blanks, or click blank then click option'
AGOOD
BUNKNOWN
CERROR
DBAD
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'BAD' or 'ERROR' flags for valid data.
2fill in blank
medium

Complete the code to mark the data quality flag as 'BAD' if the sensor reading is out of range.

SCADA systems
if sensor_reading < min_value or sensor_reading > max_value:
    data_quality_flag = '[1]'
Drag options to blanks, or click blank then click option'
AGOOD
BVALID
CUNKNOWN
DBAD
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'GOOD' flag for out of range data.
3fill in blank
hard

Fix the error in the code to correctly assign the 'UNKNOWN' flag when sensor status is unclear.

SCADA systems
if sensor_status == 'uncertain':
    data_quality_flag = '[1]'
Drag options to blanks, or click blank then click option'
AUNKNOWN
BBAD
CGOOD
DERROR
Attempts:
3 left
💡 Hint
Common Mistakes
Assigning 'GOOD' or 'BAD' flags when status is uncertain.
4fill in blank
hard

Fill both blanks to set the flag to 'ERROR' if sensor reading is None and log the issue.

SCADA systems
if sensor_reading is [1]:
    data_quality_flag = '[2]'
    log_issue('Sensor reading missing')
Drag options to blanks, or click blank then click option'
ANone
BGOOD
CERROR
DBAD
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'BAD' or 'GOOD' flags for missing data.
5fill in blank
hard

Fill all three blanks to create a dictionary mapping sensor IDs to their data quality flags, including only sensors with 'GOOD' or 'UNKNOWN' flags.

SCADA systems
quality_map = {sensor_id: data_quality_flags[sensor_id] for sensor_id in sensor_ids if data_quality_flags[sensor_id] [1] ['GOOD', 'UNKNOWN'] and sensor_id [2] None and data_quality_flags[sensor_id] [3] 'BAD'}
Drag options to blanks, or click blank then click option'
Ain
Bis not
C!=
D==
Attempts:
3 left
💡 Hint
Common Mistakes
Using '==' instead of 'in' for list membership.
Using '==' instead of '!=' to exclude flags.