🧩Assignment
Also known as Variable Assignment, Assignment Statement
The step that puts a value in a variable. Most languages use one = sign.
Think of it like
Think of it like a label you stick on a jar of jam.
Example
Lucy writes total = 5 + 3. Python works out 8, then stores 8 under the name total.
Why it matters
Every variable gets its value through assignment. Reading = as store makes lines like count = count + 1 clear.
Definition
Example code
python
>>> count = 1
>>> count = count + 1
>>> count
2Common mistake
Key takeaways
- 1Right side first. The value is worked out, then stored.
- 2Store, not equal. One = sign means put this in that box.
- 3Replaces the old. The new value takes the old one's place.