Practice - 5 Tasks
Answer the questions below
1fill in blank
easyComplete the code to initialize the token counter variable.
Agentic_ai
token_count = [1] Drag options to blanks, or click blank then click option'
Attempts:
3 left
2fill in blank
mediumComplete the code to add the number of tokens used in the current step to the total count.
Agentic_ai
token_count [1]= tokens_used Drag options to blanks, or click blank then click option'
Attempts:
3 left
3fill in blank
hardFix the error in the code to calculate the cost based on tokens used and price per token.
Agentic_ai
cost = tokens_used [1] price_per_token Drag options to blanks, or click blank then click option'
Attempts:
3 left
4fill in blank
hardFill both blanks to create a dictionary that tracks tokens and cost for each step.
Agentic_ai
usage = {'tokens': [1], 'cost': [2] Drag options to blanks, or click blank then click option'
Attempts:
3 left
5fill in blank
hardFill all three blanks to update total tokens, calculate cost, and store usage info.
Agentic_ai
token_count [1]= tokens_used cost = tokens_used [2] price_per_token usage = {'tokens': tokens_used, 'cost': [3]
Drag options to blanks, or click blank then click option'
Attempts:
3 left
