Bird
Raised Fist0
Agentic AIml~10 mins

Why agents represent the next AI paradigm in Agentic AI - Test Your Understanding

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to create a simple AI agent class.

Agentic AI
class Agent:
    def __init__(self, name):
        self.name = [1]
Drag options to blanks, or click blank then click option'
Aname
Bagent
Cself
DAI
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'agent' instead of 'name' as the value.
Using 'self' which is the instance, not the parameter.
2fill in blank
medium

Complete the code to make the agent perform an action.

Agentic AI
class Agent:
    def act(self, task):
        print(f"Agent [1] is performing: {task}")
Drag options to blanks, or click blank then click option'
Aaction
Btask
Cname
Dself.name
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'task' instead of the agent's name.
Using 'name' which is not defined in this method.
3fill in blank
hard

Fix the error in the agent's decision method to return the correct action.

Agentic AI
class Agent:
    def decide(self, options):
        best_option = max(options, key=lambda x: x['score'])
        return best_option[1]
Drag options to blanks, or click blank then click option'
A['score']
B['action']
C.action
D.score
Attempts:
3 left
💡 Hint
Common Mistakes
Using dot notation which does not work for dictionaries.
Returning the score instead of the action.
4fill in blank
hard

Fill both blanks to create a dictionary comprehension that maps tasks to their priorities if priority is above 5.

Agentic AI
tasks = ['clean', 'cook', 'shop']
priorities = {'clean': 7, 'cook': 4, 'shop': 9}
high_priority = {task: priorities[task] for task in tasks if priorities[task] [1] [2]
Drag options to blanks, or click blank then click option'
A>
B5
C<
D7
Attempts:
3 left
💡 Hint
Common Mistakes
Using '<' instead of '>' causing wrong filtering.
Using 7 instead of 5 as the threshold.
5fill in blank
hard

Fill all three blanks to create a dictionary of task names in uppercase mapped to their priority if priority is less than 8.

Agentic AI
tasks = ['read', 'write', 'code']
priorities = {'read': 6, 'write': 8, 'code': 7}
filtered_tasks = {task[1]: priorities[task] for task in tasks if priorities[task] [2] [3]
Drag options to blanks, or click blank then click option'
A.upper()
B<
C8
D.lower()
Attempts:
3 left
💡 Hint
Common Mistakes
Using .lower() instead of .upper() for task names.
Using '>' instead of '<' for filtering priorities.