Loading

Quipoin Menu

Learn • Practice • Grow

ai-foundation / AI Agents and Environments
exercise
1/5
Exercise 1Ai-foundation
Question

Write a Python class `Agent` with attributes `name` and `percept`. Include a method `act()` that prints the action based on percept (if percept contains 'danger', action='avoid'; else action='explore'). Create an agent and test.