📖 Coding lessons · 2 of 4 · 4 min
Variables: boxes for values
A variable is a named box that stores a value. In Python:
name = "Asha" score = 10 score = score + 5 print(name, score)
This prints Asha 15. The value in the box changed from 10 to 15.
Types of values: whole numbers (int, 10), decimals (float, 3.14), text (str, "Asha") and True / False (bool).
💡 Good names explain themselves: marks_total is better than x. Names cannot start with a digit or contain spaces.
