0
0
Agentic_aiml~10 mins

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

Choose your learning style8 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
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
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
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
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