T1-R3 in five minutes

Open app View repo

A function takes an input and returns an output.

Strings, numbers, lists, and dicts cover the labs.

A pure function is easier to test than a hidden global.

Name the unit: tokens, milliseconds, or documents.

Print the value and the unit together.

Agent code fails when a function both computes and secretly sends data. Split the calculation from the side effect so a test can call the calculation alone.

Sources and go deeper

sources.json