Complete the code to set the alarm priority to high.
alarm.set_priority([1])The alarm priority is set to high using the set_priority method.
Complete the code to check if the alarm priority is set to critical.
if alarm.priority == [1]: alert_operator()
The code checks if the alarm priority is critical by comparing the priority string.
Fix the error in the code to correctly set the alarm priority to medium.
alarm.priority = [1]The priority must be a string, so it should be enclosed in quotes like 'medium'.
Fill both blanks to create a dictionary mapping alarm names to their priority levels.
alarm_priorities = {'fire_alarm': [1], 'power_failure': [2]The fire_alarm is set to critical priority and power_failure to high priority.
Fill all three blanks to filter alarms with priority higher than medium.
high_priority_alarms = {name: level for name, level in alarms.items() if level [1] [2] and level != [3]This code selects alarms with priority greater than 'medium' and excludes 'low' priority alarms.