Phase 0 · Tools · Python core
Variables
Give values names so your program can remember and reuse them.
Why it matters
Every AI program moves named values around: the prompt you send, the API key that authenticates it, the model's reply, the score you give that reply. Variables are how code holds on to those values between one step and the next. Get comfortable here and the code in every later lesson reads like a list of plain instructions.
What you'll be able to do
- Store a value under a name and use it later
- Predict what a variable holds after it's reassigned
- Tell text, whole numbers and decimals apart with type()
- Pick names Python accepts and people can read
Before this lesson
Next in this phase: Numbers and arithmetic