Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Storing Numbers | Variables and Types
course content

Зміст курсу

Introduction to Python

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 2024, 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

Use items from the list below by dragging and dropping them into the blanks to form a new variable.

Натисніть або перетягніть елементи та заповніть пропуски

Все було зрозуміло?

Секція 2. Розділ 1
course content

Зміст курсу

Introduction to Python

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 2024, 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

Use items from the list below by dragging and dropping them into the blanks to form a new variable.

Натисніть або перетягніть елементи та заповніть пропуски

Все було зрозуміло?

Секція 2. Розділ 1
some-alt