0
0
Agentic AIml~10 mins

Sequential step execution in Agentic AI - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to start the first step in the sequence.

Agentic AI
result = agent.execute_step([1])
Drag options to blanks, or click blank then click option'
A'step_1'
B'start'
C'init'
D'begin'
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'start' or 'init' instead of the exact step name 'step_1'.
Forgetting to put the step name in quotes.
2fill in blank
medium

Complete the code to check if the current step is finished.

Agentic AI
if agent.status == [1]:
    print('Step complete')
Drag options to blanks, or click blank then click option'
A'running'
B'pending'
C'finished'
D'error'
Attempts:
3 left
💡 Hint
Common Mistakes
Checking for 'running' instead of 'finished'.
Using 'pending' which means not started yet.
3fill in blank
hard

Fix the error in the code to move to the next step.

Agentic AI
next_step = agent.get_next_step()
agent.execute_step([1])
Drag options to blanks, or click blank then click option'
Aagent.get_next_step
Bagent.next_step
Cstep_next
Dnext_step
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'agent.next_step' which is not defined.
Passing the method itself instead of its result.
4fill in blank
hard

Fill both blanks to create a loop that runs all steps until done.

Agentic AI
while agent.status != [1]:
    current = agent.get_current_step()
    agent.execute_step([2])
Drag options to blanks, or click blank then click option'
A'finished'
Bcurrent
C'running'
Dagent.status
Attempts:
3 left
💡 Hint
Common Mistakes
Checking for 'running' instead of 'finished' in the loop condition.
Passing 'agent.status' instead of the current step to execute_step.
5fill in blank
hard

Fill all three blanks to collect results from each step in a list.

Agentic AI
results = []
while agent.status != [1]:
    step = agent.get_current_step()
    output = agent.execute_step([2])
    results.[3](output)
Drag options to blanks, or click blank then click option'
A'finished'
Bstep
Cappend
Dextend
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'extend' which expects an iterable, not a single output.
Passing wrong variable to execute_step.