A girl and a robot thinking together

Think Together · Start with a Short Story

The robot generates code to find an average. The girl tests it with 2 and 3, but the result is 2.

Lay Out the Process

Follow the numbered steps, then explain them in your own words
  1. Read the requirementThe average should keep its decimal part
  2. Choose an example2 and 3
  3. Work out the expected result2.5
  4. Compare with the codeCheck for integer division

AI-generated code can contain logic, edge-case, or security errors. A promise from the model cannot replace checking it.

Check inputs you can calculate by hand, boundary values, and error cases. Compare the code's explanation with what actually happens instead of judging only how smoothly it explains itself.

If the code works with files, accounts, or networks, understand its side effects first.

Now You Try

If AI says again, “This code is completely fine,” can that replace running the example with 2 and 3?

Ready? Open this to see the explanation

No. The actual result and the rule are the evidence. Find the operation type and correct it.

One Idea to Take Away

AI-generated code can contain logic, edge-case, or security errors. A promise from the model cannot replace checking it.

Try covering the diagram above and explaining each step to someone in your family. If one step is hard to explain, return to that card and look again.