scores = [6, 8, 10]
def average_score() -> float:
"""Return the mean of the current practice scores."""
return sum(scores) / len(scores)
print(f"Mean: {average_score()}")Mean: 8.0
Run setup, select the AI question, and inspect Context for AI question in its header. Preview reads your idle kernel without contacting a model. Connect ChatGPT or an API provider before running the question.
average_score remains offered through its separate Tools choice.average_score; enable it again before asking the model to call the function.A checkmark indicates selection; partial or omitted by budget shows what fits. The displayed budget is a character estimate, not a token count.
scores = [6, 8, 10]
def average_score() -> float:
"""Return the mean of the current practice scores."""
return sum(scores) / len(scores)
print(f"Mean: {average_score()}")Mean: 8.0
average_score: retrieve the current mean.Unchecking Context on this note does not remove the tool. Uncheck its separate Tools checkbox to withdraw this declaration. Another enabled declaration of the same function would still offer it. Only declarations above or in the current question register tools; wider modes never register new declarations below.
The three practice scores are each out of ten. Compare each score with the mean. They describe one short practice session, not the student’s overall ability.
Call &average_score once for the current practice scores and explain the returned mean. Identify any later comparison note included in your Context preview, and distinguish that source text from the live Python value.
The live average_score() call returned 8.0: for this practice session, 6 is below the mean, 8 equals it, and 10 is above it. No later comparison note appears in the supplied context, so I can’t identify its text; notebook source is separate from the live Python result.
Observed live tool calls for the answer above (actual subscription events; private fields shortened).
| Tool | Result state | Submitted arguments | Observed result |
|---|---|---|---|
average_score |
completed | {} | 8.0 |
A different practice session had scores 7, 9, and 8. This text is below the question. Default and All above exclude it. Full notebook, 10 above + below, or a Custom choice can include it as below-question source. No code is executed by selecting this note.
Context selects text; Tools controls declarations from each eligible cell. Tool choices save across modes and default to enabled for new cells. Neither control resets Python state. Offered read tools can independently retrieve other text.
Selected code cells can include bounded displayed text outputs, which may be stale after source edits. Image pixels require an explicit attachment to the question. Keep answer and Run All retain their usual behavior.