Read the names in a tiny tool
This is the first moment where code appears. Do not panic and do not try to memorize rules.
Treat the code like a labeled note.
task = "follow-up email"
minutes_saved = 12
repeats_per_week = 5
Each line gives the tool a name it can reuse later. That is all a variable is for now: a name attached to a value.
Values come in a few shapes
Look at the right-hand side of each = and ask: what did Python just see?
- Quotes around it? Text. Python calls this a
str—"follow-up email"is one. - Bare digits, no quotes? A whole number, an
int—12and5. - The word
TrueorFalsestanding alone? A yes-or-no flag, abool. - The word
Nonestanding alone? The absence of a value — nothing here yet. It shows up when a tool hasn't found or computed anything.
That covers most of what AI-generated scripts hold. One trap to file away
now: "12" with quotes is text that happens to look like a number, not the
number twelve. The two print identically and behave nothing alike — and
mixing them up is one of the most common bugs in AI-generated code. The next
step drills telling them apart.
Why this matters for AI work
When you ask AI to build a tool, it often gives you a small script. The
script will have names like task, customer_email, draft, score,
limit, or summary.
If you can read the names, you can ask better questions:
- what does this tool know?
- what did it calculate?
- what sentence will it print?
- what can I safely change?
That is not “learning Python” in the school sense. That is staying in charge of the thing AI made for you.
The first move
Hit Run.
Do not edit anything yet. Just run the tool and read the sentence it prints.
One note about the last line: the f before the opening quote makes it an
f-string — anything inside { } gets swapped for the value of that name.
That is how the script turns its variables into a sentence, and you'll use it
yourself in a few steps.
Then we will trace where each part of the sentence came from.