Module 2 · Python data types, variables, operators, and basic I/O operations
Variables
Give your data a name so you can store it, reuse it, and change it. Named boxes that hold a value — the memory your programs run on.
Begin lesson 1 →- 1Variables — data-shaped boxesA named box that holds a value of any type.→
- 2Variable namesThe rules and conventions for naming your boxes.→
- 3How to create a variableAssignment: put a value into a name with =.→
- 4How to use variablesUse the name and Python fills in the value.→
- 5Assigning a new valueChange what a variable holds — even using its old value.→
- 6Solving simple problemsPut variables and operators together to compute a result.→
- 7Shortcut operatorsx += 1 and friends — shorthand for updating a variable.→
- 8QuizCheck your understanding of variables.→