Practice - 5 Tasks
Answer the questions below
1fill in blank
easyComplete the code to set the system to manual mode.
SCADA systems
system.mode = '[1]'
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'auto' instead of 'manual'
Adding extra words like 'manual_mode'
✗ Incorrect
The system mode must be set exactly to 'manual' to switch to manual mode.
2fill in blank
mediumComplete the code to check if the system is in automatic mode.
SCADA systems
if system.mode == '[1]':
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Checking for 'auto' instead of 'automatic'
Using 'manual' by mistake
✗ Incorrect
To check automatic mode, compare the mode string to 'automatic'.
3fill in blank
hardFix the error in the code to switch to automatic mode.
SCADA systems
system.set_mode([1]) Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Passing automatic without quotes
Using 'auto' instead of 'automatic'
✗ Incorrect
The mode must be passed as a string with quotes, so use 'automatic'.
4fill in blank
hardFill both blanks to create a function that toggles between automatic and manual modes.
SCADA systems
def toggle_mode(system): if system.mode == '[1]': system.mode = '[2]'
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'auto' or 'manual_mode' instead of correct strings
✗ Incorrect
The function checks if the mode is 'automatic' and switches it to 'manual'.
5fill in blank
hardFill all three blanks to complete the code that sets mode based on a condition.
SCADA systems
def set_mode(system, auto_enabled): system.mode = '[1]' if [2] else '[3]'
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'manual_mode' instead of 'manual'
Using wrong condition variable
✗ Incorrect
The mode is set to 'automatic' if auto_enabled is True, otherwise 'manual'.