Practice - 5 Tasks
Answer the questions below
1fill in blank
easyComplete the code to create multiple agents running in parallel.
Agentic_ai
agents = [Agent() for _ in range([1])]
Drag options to blanks, or click blank then click option'
Attempts:
3 left
2fill in blank
mediumComplete the code to start all agents asynchronously.
Agentic_ai
results = await asyncio.gather(*[agent.[1]() for agent in agents])
Drag options to blanks, or click blank then click option'
Attempts:
3 left
3fill in blank
hardFix the error in the code to correctly collect agent outputs.
Agentic_ai
outputs = [agent.[1]() for agent in agents] results = await asyncio.gather(*outputs)
Drag options to blanks, or click blank then click option'
Attempts:
3 left
4fill in blank
hardFill both blanks to create a dictionary of agent results filtered by success.
Agentic_ai
success_results = {agent.id: result for agent, result in zip(agents, results) if result [1] [2] Drag options to blanks, or click blank then click option'
Attempts:
3 left
5fill in blank
hardFill all three blanks to aggregate agent outputs into a summary dictionary.
Agentic_ai
summary = [1](agent.id: [2] for agent, [3] in zip(agents, results))
Drag options to blanks, or click blank then click option'
Attempts:
3 left
