0
0
Agentic_aiml~10 mins

Tool permission boundaries in Agentic Ai - Interactive Code Practice

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

Complete the code to define a tool permission boundary that restricts access to only approved tools.

Agentic_ai
tool_permissions = [1](['search', 'calculator'])
Drag options to blanks, or click blank then click option'
Alist
Btuple
Cdict
Dset
Attempts:
3 left
2fill in blank
medium

Complete the code to check if the tool 'email' is allowed by the permission boundary.

Agentic_ai
if 'email' [1] tool_permissions:
    print('Access granted')
else:
    print('Access denied')
Drag options to blanks, or click blank then click option'
A==
Bnot in
Cin
D!=
Attempts:
3 left
3fill in blank
hard

Fix the error in the code that attempts to add a new tool 'calendar' to the permission boundary.

Agentic_ai
tool_permissions.[1]('calendar')
Drag options to blanks, or click blank then click option'
Ainsert
Badd
Cappend
Dextend
Attempts:
3 left
4fill in blank
hard

Fill both blanks to create a function that returns True if a tool is allowed, False otherwise.

Agentic_ai
def is_tool_allowed(tool):
    return tool [1] tool_permissions [2] True
Drag options to blanks, or click blank then click option'
Ain
B==
Cis
D!=
Attempts:
3 left
5fill in blank
hard

Fill all three blanks to create a dictionary comprehension that maps each tool to a boolean indicating permission.

Agentic_ai
tool_access = {tool: tool [1] tool_permissions [2] True for tool in tools if tool [3] tool_permissions}
Drag options to blanks, or click blank then click option'
Ain
B==
Cnot in
D!=
Attempts:
3 left