Interactive Python lesson
Values & Variables: Reassignment
Variables are allowed to change their mind. This Block introduces reassignment in Python: giving an existing variable name a new current value. You will start with simple examples like score = 0 followed by score = 10, then move into the classic beginner brain-scrambler: score = score + 1.
The goal is to make reassignment feel normal, not mysterious. You will learn why Python handles the right side first, how the result gets saved back into the variable, and why calculating something is not the same as storing it.
What you will learn:
- Reassign a variable to a new value
- Understand that
= means assignment, not permanent equality
- Update numbers using their previous value, like
score = score + 1
- Spot the difference between calculating a value and saving it
- Reassign text values such as names, statuses, and rooms
- Understand why copying one variable does not keep it connected forever
- Avoid common beginner bugs with missing starting values and misspelled names
By the end, you will have a clean mental model: Python calculates the right side first, then assigns the result to the name on the left. Simple enough, but powerful enough to show up everywhere.