Good! Let's move on to variables. Variables in programming languages are named places in computer memory where we can store data and retrieve it later. They are a bit like cells in Excel.
In Python, you provide your own names for variables, but they must start with either a letter or an underscore (
_). In other words, a variable cannot start with punctuation or digits.
current_age = 25
This line of code:
- Creates a new variable named
- Assigns the value of 25 to
The equals sign (
=) means 'assign the value of' in Python. Next, you can use
print() to show the value of
In Python variable names are case sensitive. This means that
CURRENT_AGE are two different variables! Remember that each command in Python should start from a new line.