Practice - 5 Tasks
Answer the questions below
1fill in blank
easyComplete the code to define the entry point of the system flow.
LLD
def system_entry(): print("System is starting...") [1]
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using exit or shutdown functions in the entry flow.
✗ Incorrect
The entry flow should initialize components to start the system properly.
2fill in blank
mediumComplete the code to define the exit point of the system flow.
LLD
def system_exit(): print("System is shutting down...") [1]
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Calling initialization or start functions during exit.
✗ Incorrect
The exit flow should properly shutdown components to close the system safely.
3fill in blank
hardFix the error in the flow control to ensure proper entry and exit.
LLD
def main_flow(): [1] process_tasks() system_exit()
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Calling exit before entry or processing.
✗ Incorrect
The main flow should start with system_entry to initialize before processing tasks.
4fill in blank
hardFill both blanks to correctly handle entry and exit logging.
LLD
def system_flow(): [1] # Log entry system_entry() process_tasks() system_exit() [2] # Log exit
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Swapping entry and exit logs.
Using unrelated log functions.
✗ Incorrect
Logging entry and exit helps track system flow start and stop events.
5fill in blank
hardFill all three blanks to implement a safe entry and exit flow with error handling.
LLD
def safe_system_flow(): try: [1] # Initialize process_tasks() except Exception as e: [2] # Handle error finally: [3] # Ensure exit
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Not calling exit in finally block.
Logging errors outside except block.
✗ Incorrect
Entry initializes, errors are logged, and exit always runs to clean up.
