Practice - 5 Tasks
Answer the questions below
1fill in blank
easyComplete the code to initialize two agents for debate.
Agentic AI
agent1 = Agent(name='Agent1') agent2 = Agent(name=[1])
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using the same name as the first agent.
Using unrelated names that confuse the roles.
✗ Incorrect
The second agent should be named 'Agent2' to represent the second debater.
2fill in blank
mediumComplete the code to start a debate round between two agents.
Agentic AI
debate = Debate(agents=[agent1, agent2])
debate.[1]() Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'conclude' which ends the debate instead of starting it.
Using 'pause' which temporarily stops the debate.
✗ Incorrect
The debate should be started with the 'start' method to begin the interaction.
3fill in blank
hardFix the error in the code to collect consensus from agents.
Agentic AI
consensus = debate.collect_[1]() Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'votes' which may refer to individual preferences, not final consensus.
Using 'results' which is too generic.
✗ Incorrect
The method to collect the final agreement is 'collect_consensus'.
4fill in blank
hardFill both blanks to define a function that runs debate and returns consensus.
Agentic AI
def run_debate(agents): debate = Debate(agents=agents) debate.[1]() return debate.collect_[2]()
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'pause' instead of 'start' to begin the debate.
Using 'votes' instead of 'consensus' to collect results.
✗ Incorrect
The debate must be started with 'start' and consensus collected with 'consensus'.
5fill in blank
hardFill all three blanks to create a consensus pattern with agents debating and agreeing.
Agentic AI
agents = [Agent(name='A1'), Agent(name='A2')] debate = Debate(agents=[1]) debate.[2]() final_consensus = debate.collect_[3]()
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'participants' instead of 'agents' for the debate constructor.
Using 'pause' or 'reset' instead of 'start' to begin.
Using 'votes' or 'results' instead of 'consensus' to collect.
✗ Incorrect
The debate is created with 'agents', started with 'start', and consensus collected with 'consensus'.