What does variable mean?
A named location in memory that holds a value which can change while the program runs. Assigning gives it a value; using its name reads the value back.
In a lesson
A variable is a name that holds a value. It is the first idea in this module that is genuinely new, and every later idea is built on it. Take it slowly.
Learn it
- Taught in F1.6 Variables, constants and assignment Programming basics, GCSE
Used in
- F1.7 Input from the user
- F1.10 Project: ask and drive
- F2.2 Selection: if
- F2.4 Nested selection and match
- F2.5 Count-controlled loops: for
- F2.7 Loop patterns
- F3.3 Lists: one-dimensional arrays
- F4.2 Parameters and return values
- F4.3 Local and global variables
- F4.6 Project: the patrol
and 62 more lessons.
Do the lesson in the simulator