Practice - 5 Tasks
Answer the questions below
1fill in blank
easyComplete the code to initialize the reasoning chain with an empty list.
Agentic_ai
reasoning_chain = [1] Drag options to blanks, or click blank then click option'
Attempts:
3 left
2fill in blank
mediumComplete the code to add a new reasoning step to the chain.
Agentic_ai
reasoning_chain.[1]('Step 1: Analyze input data')
Drag options to blanks, or click blank then click option'
Attempts:
3 left
3fill in blank
hardFix the error in the code to retrieve the last reasoning step.
Agentic_ai
last_step = reasoning_chain[1] Drag options to blanks, or click blank then click option'
Attempts:
3 left
4fill in blank
hardFill both blanks to create a dictionary mapping step numbers to reasoning steps.
Agentic_ai
step_dict = { [1]: reasoning_chain[[2]] for [1] in range(len(reasoning_chain)) } Drag options to blanks, or click blank then click option'
Attempts:
3 left
5fill in blank
hardFill all three blanks to filter reasoning steps containing the word 'data' and create a list of those steps.
Agentic_ai
filtered_steps = [step for step in reasoning_chain if '[1]' in step.lower() and len(step) [2] int([3])]
Drag options to blanks, or click blank then click option'
Attempts:
3 left
