Practice - 5 Tasks
Answer the questions below
1fill in blank
easyComplete the code to start the async agent execution.
Agentic_ai
result = await agent.[1](input_data) Drag options to blanks, or click blank then click option'
Attempts:
3 left
2fill in blank
mediumComplete the code to await the agent's async response.
Agentic_ai
response = await agent.[1](query) Drag options to blanks, or click blank then click option'
Attempts:
3 left
3fill in blank
hardFix the error in the async agent call to properly get the output.
Agentic_ai
output = agent.[1](input_text) Drag options to blanks, or click blank then click option'
Attempts:
3 left
4fill in blank
hardFill both blanks to create an async function that runs the agent and returns the result.
Agentic_ai
async def run_agent(input_text): result = await agent.[1](input_text) return [2]
Drag options to blanks, or click blank then click option'
Attempts:
3 left
5fill in blank
hardFill all three blanks to handle async agent execution with error catching.
Agentic_ai
async def safe_execute(input_text): try: response = await agent.[1](input_text) except [2] as e: print(f"Error: {e}") return [3] return response
Drag options to blanks, or click blank then click option'
Attempts:
3 left
