Practice - 5 Tasks
Answer the questions below
1fill in blank
easyComplete the code to make the agent observe its environment.
Prompt Engineering / GenAI
observation = environment.[1]() Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'act' instead of 'observe' to get information.
✗ Incorrect
The agent uses the observe method to get information from the environment.
2fill in blank
mediumComplete the code to make the agent think and decide the next action.
Prompt Engineering / GenAI
action = agent.[1](observation) Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'act' instead of 'think' to decide the next step.
✗ Incorrect
The agent uses the think method to process the observation and decide what to do next.
3fill in blank
hardFix the error in the code to make the agent perform the action.
Prompt Engineering / GenAI
environment.[1](action) Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'think' or 'observe' instead of 'act' to perform actions.
✗ Incorrect
The agent must act on the environment to perform the chosen action.
4fill in blank
hardFill both blanks to complete the agent's main loop for observe and act.
Prompt Engineering / GenAI
while True: observation = environment.[1]() action = agent.[2](observation)
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Swapping the order of observe and think methods.
✗ Incorrect
The agent continuously observes the environment and then thinks to decide the action.
5fill in blank
hardFill all three blanks to complete the agent's full cycle: observe, think, and act.
Prompt Engineering / GenAI
while True: observation = environment.[1]() action = agent.[2](observation) environment.[3](action)
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Mixing up the order of observe, think, and act.
✗ Incorrect
The agent observes the environment, thinks to decide, then acts to change the environment.