Practice - 5 Tasks
Answer the questions below
1fill in blank
easyComplete the code to define a production agent's main loop.
Agentic_ai
while agent.is_active(): action = agent.[1](input_data) agent.execute(action)
Drag options to blanks, or click blank then click option'
Attempts:
3 left
2fill in blank
mediumComplete the code to initialize a production agent with a specific architecture.
Agentic_ai
agent = ProductionAgent(architecture=[1]) Drag options to blanks, or click blank then click option'
Attempts:
3 left
3fill in blank
hardFix the error in the code that updates the agent's state in production.
Agentic_ai
def update_state(self, input): self.state = self.state [1] input return self.state
Drag options to blanks, or click blank then click option'
Attempts:
3 left
4fill in blank
hardFill in the blank to create a dictionary comprehension that filters agent logs for errors.
Agentic_ai
error_logs = {log_id: log for log_id, log in logs.items() if [1] in log} Drag options to blanks, or click blank then click option'
Attempts:
3 left
5fill in blank
hardFill all three blanks to create a dictionary comprehension that maps agent IDs to their status if active.
Agentic_ai
active_agents = {agent[1]: agent[2] for agent in agents if agent.status [3] 'active'} Drag options to blanks, or click blank then click option'
Attempts:
3 left
