Storing NumbersStoring Numbers

Variables in programming act like placeholders for data. In the last section, you crunched some numbers. But what if we want to use those numbers again later? Doing the math all over again doesn't make much sense.

To remember a value for later, we give it a name by using a variable. The equals sign = lets us set a value for that variable. For instance, you can set the variable year to the value 2022, and from there, you can display it or do more math with it.

Task

We're in the seventh chapter of the course. Set up a variable called chapter and give it the value 7.

question-icon

Fill in the blanks to complete the task.

_ _ _
_ _ _
_ _ _

Click or drag`n`drop items and fill in the blanks

dots
chapter
dots
=
dots
7
down-icon

Everything was clear?

Section 2. Chapter 1