Practice - 5 Tasks
Answer the questions below
1fill in blank
easyComplete the code to log the start of a tool call.
Agentic_ai
logger.[1]("Starting tool execution")
Drag options to blanks, or click blank then click option'
Attempts:
3 left
2fill in blank
mediumComplete the code to log the result of a tool call.
Agentic_ai
logger.[1](f"Tool result: {result}")
Drag options to blanks, or click blank then click option'
Attempts:
3 left
3fill in blank
hardFix the error in the logging call to correctly log an exception.
Agentic_ai
logger.error(f"Tool failed with error: {error}", [1]=True)
Drag options to blanks, or click blank then click option'
Attempts:
3 left
4fill in blank
hardFill both blanks to log the tool call and its duration.
Agentic_ai
logger.[1](f"Tool {tool_name} called") logger.[2](f"Duration: {duration} seconds")
Drag options to blanks, or click blank then click option'
Attempts:
3 left
5fill in blank
hardFill all three blanks to log tool call, result, and error if any.
Agentic_ai
logger.[1](f"Calling tool: {tool_name}") logger.[2](f"Result: {result}") if error: logger.[3](f"Error: {error}", exc_info=True)
Drag options to blanks, or click blank then click option'
Attempts:
3 left
