Bird
Raised Fist0
Agentic AIml~10 mins

Personal assistant agent patterns in Agentic AI - Interactive Code Practice

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

Complete the code to initialize a personal assistant agent with a name.

Agentic AI
assistant = PersonalAssistant(name=[1])
Drag options to blanks, or click blank then click option'
Aname
BJarvis
C"Jarvis"
Dassistant
Attempts:
3 left
💡 Hint
Common Mistakes
Forgetting to put quotes around the name.
Passing a variable instead of a string.
2fill in blank
medium

Complete the code to add a task to the assistant's task list.

Agentic AI
assistant.tasks.[1]("Schedule meeting at 3 PM")
Drag options to blanks, or click blank then click option'
Aremove
Bpop
Cclear
Dappend
Attempts:
3 left
💡 Hint
Common Mistakes
Using remove or pop which delete items instead of adding.
Using clear which empties the list.
3fill in blank
hard

Fix the error in the code to check if the assistant is available.

Agentic AI
if assistant.[1]():
    print("Assistant is ready")
Drag options to blanks, or click blank then click option'
Ais_ready
Bready
Cavailable
DisAvailable
Attempts:
3 left
💡 Hint
Common Mistakes
Using camelCase instead of snake_case.
Using a property name instead of a method.
4fill in blank
hard

Fill both blanks to create a dictionary of tasks with their priorities.

Agentic AI
task_dict = {task[1]: priority[2] tasks}
Drag options to blanks, or click blank then click option'
A for task, priority in
B if priority > 1 for
C in
D ==
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'if' instead of 'for' in the comprehension.
Using '==' instead of 'in' to loop.
5fill in blank
hard

Fill all three blanks to filter tasks with priority above 2 and create a list of their names.

Agentic AI
high_priority_tasks = [task[1] for task, priority [2] tasks if priority [3] 2]
Drag options to blanks, or click blank then click option'
A.name
Bin
C>
D==
Attempts:
3 left
💡 Hint
Common Mistakes
Using '==' instead of '>' for filtering.
Forgetting to access the task's name with .name.