Unit 03 · overview
Unit 3: Variables, Data & Input
Programs become interesting when values can change while the program runs.
That means you need a stronger mental model than “variables are boxes.” In Python, names refer to values or objects, expressions produce values, input begins as text, and conversion changes what operations are legal.
Follow one value instead of memorizing syntax
A typical data path looks like this:
keyboard text
-> input()
-> string value
-> conversion
-> numeric value
-> calculation
-> updated state
-> formatted output
This Unit follows that path repeatedly. You will work with names, reassignment, strings, integers, floating-point values, input(), conversion functions, and formatted output. More importantly, you will predict state before execution and compare that prediction with what Python actually produced.
The common failures are useful: trying to add a string to an integer, converting invalid text, or assuming a variable has one permanent value for the entire program.
Evidence to keep
Choose one program that accepts input, converts it, performs a calculation, and reports a result. Keep a trace showing the value and type at each important step. The final artifact should make it possible for another learner to answer: what changed, when did it change, and why was that operation valid?