Programming ConceptsLesson 3Free preview
Variables
This lesson is part of Intro to Programming · All levels
Summary
This lesson discusses variables as named containers to store data that can change during the program's run. Each variable has a name, a data type, and a value; its value can be exchanged through assignment operations. The timely and consistent naming of variables makes the code easier to read and free of misuse.
Key points
- A variable is a named container that holds value and can change
- Variable components: name, data type, and value
- Assignment with = placing value to variable
- The variable must be declared before use
Full lesson
Code examples and quizzes
Full lessons, code examples, and quizzes are available to subscribers. 5 questions.