Practice - 5 Tasks
Answer the questions below
1fill in blank
easyComplete the code to define a redundant system component.
SCADA systems
component_status = 'active' if [1] else 'standby'
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Choosing backup_component makes the system standby incorrectly.
✗ Incorrect
The primary component is active while the backup is on standby to prevent downtime.
2fill in blank
mediumComplete the code to switch to backup if primary fails.
SCADA systems
if not primary_component.is_operational(): [1].activate()
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Activating primary_component again causes no change.
✗ Incorrect
If the primary component fails, the backup component activates to keep the system running.
3fill in blank
hardFix the error in the redundancy check condition.
SCADA systems
if [1].status == 'failed' and backup_component.status == 'ready': backup_component.activate()
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Checking backup_component.status instead of primary_component.status.
✗ Incorrect
The condition must check if the primary component has failed before activating the backup.
4fill in blank
hardFill both blanks to create a monitoring loop for redundancy.
SCADA systems
while system.is_running(): if [1].status == 'failed': [2].activate()
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Swapping primary and backup components in blanks.
✗ Incorrect
The loop checks if the primary component failed and activates the backup component to prevent downtime.
5fill in blank
hardFill all three blanks to define a failover function for redundancy.
SCADA systems
def failover(): if [1].status == 'failed': [2].activate() log('Switched to [3]')
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Logging the wrong component name in the message.
✗ Incorrect
The function checks if the primary failed, activates the backup, and logs the switch to backup.