0
0
Agentic AIml~10 mins

Task decomposition strategies 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 split a big task into smaller steps using a list.

Agentic AI
steps = ["Understand problem", [1], "Test solution"]
Drag options to blanks, or click blank then click option'
A"Break down into parts"
B"Ignore details"
C"Skip steps"
D"Do all at once"
Attempts:
3 left
💡 Hint
Common Mistakes
Choosing options that ignore or skip parts of the task.
2fill in blank
medium

Complete the code to create a function that runs each step in order.

Agentic AI
def run_steps(steps):
    for step in [1]:
        print(f"Doing: {step}")
Drag options to blanks, or click blank then click option'
Adict
Bsteps
Clist
Drange
Attempts:
3 left
💡 Hint
Common Mistakes
Using range instead of the list variable.
3fill in blank
hard

Fix the error in the code that tries to run steps but uses wrong variable name.

Agentic AI
def execute(steps):
    for s in [1]:
        print(f"Execute: {s}")
Drag options to blanks, or click blank then click option'
Astep
Btasks
Csteps
Dactions
Attempts:
3 left
💡 Hint
Common Mistakes
Using a variable name not defined in the function.
4fill in blank
hard

Fill both blanks to create a dictionary mapping step names to their order number.

Agentic AI
step_order = {step: [1] for [2], step in enumerate(steps)}
Drag options to blanks, or click blank then click option'
Aindex
Bi
Cstep
Dnumber
Attempts:
3 left
💡 Hint
Common Mistakes
Mixing up step and index variable names.
5fill in blank
hard

Fill all three blanks to filter steps that contain the word 'data' and count them.

Agentic AI
filtered = [step for step in steps if [1] in [2]]
count = len([3])
Drag options to blanks, or click blank then click option'
A"data"
Bstep
Cfiltered
Dsteps
Attempts:
3 left
💡 Hint
Common Mistakes
Using wrong variable names or forgetting to count filtered list.