0
0
Agentic_aiml~10 mins

Cost optimization strategies 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 calculate the total cost by multiplying unit cost and quantity.

Agentic_ai
total_cost = unit_cost [1] quantity
Drag options to blanks, or click blank then click option'
A*
B+
C-
D/
Attempts:
3 left
2fill in blank
medium

Complete the code to calculate the average cost from a list of costs.

Agentic_ai
average_cost = sum(costs) [1] len(costs)
Drag options to blanks, or click blank then click option'
A*
B+
C/
D-
Attempts:
3 left
3fill in blank
hard

Fix the error in the code to select the minimum cost from a list.

Agentic_ai
min_cost = [1](costs)
Drag options to blanks, or click blank then click option'
Amax
Bmin
Csum
Dlen
Attempts:
3 left
4fill in blank
hard

Fill both blanks to create a dictionary of costs for items with cost greater than 50.

Agentic_ai
high_cost_items = {item: [1] for item, [2] in costs.items() if [1] > 50}
Drag options to blanks, or click blank then click option'
Acost
Bitem
Ccosts
Dvalue
Attempts:
3 left
5fill in blank
hard

Fill all three blanks to filter and create a dictionary of items with cost less than 100.

Agentic_ai
filtered_costs = { [1]: [2] for [3], cost in costs.items() if cost < 100 }
Drag options to blanks, or click blank then click option'
Aitem
Bcost
Dvalue
Attempts:
3 left