The agent class should have an act method that returns a fixed action string.
Step 2: Analyze options
class Agent:
def act(self):
return 'move_forward' returns the string directly, which is correct. class Agent:
def act(self):
print('move_forward') prints instead of returning. class Agent:
def act(self):
self.action = 'move_forward' assigns but does not return. class Agent:
def act(self):
return self.action returns an undefined attribute.
Final Answer:
Option A -> Option A
Quick Check:
Method returns action string [OK]
Quick Trick:Return action string directly in act method [OK]
Common Mistakes:
Using print instead of return
Assigning action without returning
Returning undefined attributes
Master "Future of AI Agents" in Agentic AI
9 interactive learning modes - each teaches the same concept differently