In programming, a variable is like a box that stores data. We can put numbers, text, or other information inside, and access it later using its name.
Example A:
age = 12
print(age) # 12
Here, age is a variable that holds the value 12. The advantage of variables is that they allow programs to remember information and reuse it whenever needed.
Variable names must follow certain rules: they cannot start with a number, cannot contain spaces or special symbols, and usually consist of English words with underscores. A good variable name makes the code easier to read, such as score or wallet_money.
Now students try to define a variable that can hold your score of one exam, then print it.