Locked lesson.
About this lesson
What is a variable and how can you name them?
Exercise files
Download this lesson’s related exercise files.
Variables.docx58.7 KB Variables - Solution.docx
58.8 KB
Quick reference
Variables
Variables are containers that hold things.
When to use
Use variables whenever you want to store information for later use.
Instructions
To create a variable, simply name it and set it equal to some data:
first_name = "John"
Variables start with lowercase letters. You can use underscores and numbers in them.
Variables should not start with uppercase letters or numbers.
Variables can be changed over time, whenever you like.
Hints & tips
- Variables are containers that hold data
- Variables hold one thing at a time
- first_name = "John"
Lesson notes are only available for subscribers.