Complete the code to define a monolithic SCADA system main process.
def main_process(): system_status = '[1]' print(f"System status: {system_status}")
The main process status should be set to 'running' to indicate the SCADA system is active.
Complete the code to initialize the SCADA data collection loop.
while system_status == 'running': data = collect_data() process_data(data) if [1]: break
The loop should stop when the system status changes to 'stopped'.
Fix the error in the SCADA system shutdown function.
def shutdown_system(): global system_status system_status = [1] print("System shutdown complete.")
The system status must be set to the string 'stopped' with quotes to update correctly.
Fill both blanks to create a dictionary mapping sensor names to their status in the SCADA system.
sensor_status = { '[1]': 'active', '[2]': 'inactive' }The dictionary keys should be sensor names as strings. 'temperature_sensor' and 'humidity_sensor' are common sensors.
Fill all three blanks to create a function that logs SCADA events with timestamp and message.
def log_event([1], [2]): timestamp = get_current_time() log_entry = { '[3]': timestamp, 'message': [2] } save_log(log_entry)
The function takes 'event_type' and 'message' as parameters. The log entry uses 'event' as the key for timestamp.