Complete the code to set the system to manual mode.
system.mode = '[1]'
The system mode must be set exactly to 'manual' to switch to manual mode.
Complete the code to check if the system is in automatic mode.
if system.mode == '[1]':
To check automatic mode, compare the mode string to 'automatic'.
Fix the error in the code to switch to automatic mode.
system.set_mode([1])The mode must be passed as a string with quotes, so use 'automatic'.
Fill both blanks to create a function that toggles between automatic and manual modes.
def toggle_mode(system): if system.mode == '[1]': system.mode = '[2]'
The function checks if the mode is 'automatic' and switches it to 'manual'.
Fill all three blanks to complete the code that sets mode based on a condition.
def set_mode(system, auto_enabled): system.mode = '[1]' if [2] else '[3]'
The mode is set to 'automatic' if auto_enabled is True, otherwise 'manual'.
