Variables and scalar types
Variables and common scalar types give names to values used in a program.
Guess first. It doesn't count.
What number does this code display?
batch_size = 4batch_size = 8print(batch_size)
Your answer starts the 3-minute lesson. No sign-up needed.
What you'll learn4 ideas
- A variable is a name that refers to a value.
- Assignment connects a name on the left of `=` to a value on the right.
- Reassignment connects an existing name to a new value.
- `print(name)` displays the value the name refers to when that line runs.