Variables
Lesson 2 of 20 · Py.Micro
Give a name to a value and use it again later.
price = 4 stores the value 4 under the name price. Then the name can be used anywhere the value would be. The Step by step panel shows each variable as the program runs.
Check yourself
After x = 5 and x = x + 2, what is x?
Do it in the browser: a real Python tool, a short mission and instant feedback. No install.
Start this lesson — free