Complete the code to define a hot standby system status check.
if system_status == '[1]': activate_backup()
The hot standby system is always running and ready to take over immediately, so the status to check is 'hot'.
Complete the code to set the warm standby system to sync mode.
backup_system.mode = '[1]'
Warm standby systems are synchronized but not fully active, so the mode should be set to 'sync'.
Fix the error in the code to correctly switch from warm standby to active system.
if backup_system.status == 'warm': backup_system.status = '[1]'
To switch from warm standby to active, the status must be set to 'active'.
Fill both blanks to create a dictionary representing system states and their descriptions.
system_states = {
'hot': '[1]',
'warm': '[2]'
}'hot' means the backup is fully running and ready, while 'warm' means it is synchronized but not active.
Fill all three blanks to complete the function that switches system modes based on standby type.
def switch_mode(standby_type): if standby_type == '[1]': return '[2]' elif standby_type == '[3]': return 'sync'
If the standby type is 'hot', the mode switches to 'active'. If it is 'warm', the mode switches to 'sync'.