Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Вивчайте Змінювані та Незмінювані Типи Даних | Знайомство з числами в Python
Типи даних у Python

Свайпніть щоб показати меню

book
Змінювані та Незмінювані Типи Даних

Understanding the difference between mutable and immutable data types is crucial. Mutable data types can be changed after their creation, while immutable data types cannot be modified once created.

Незмінювані типи даних, як випливає з назви, не можуть бути змінені після їх створення.
На відміну від них, змінювані типи даних - це об'єкти, які можна змінювати після їх створення.

1234567
# Define a variable `var1` with an initial value var1 = 40 print(var1) # output: 40 # Change the value of `var1` var1 = 50 print(var1) # output: 50
copy
Завдання

Swipe to start coding

Imagine you are managing a budget for a small project. Initially, your available budget is set to $100. However, you receive an additional funding of $50. Update the value of the project_budget variable to reflect the total available budget.

Once you've completed this task, click the button below the code to check your solution.

Рішення

Switch to desktopПерейдіть на комп'ютер для реальної практикиПродовжуйте з того місця, де ви зупинились, використовуючи один з наведених нижче варіантів
Все було зрозуміло?

Як ми можемо покращити це?

Дякуємо за ваш відгук!

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

single

Запитати АІ

expand

Запитати АІ

ChatGPT

Запитайте про що завгодно або спробуйте одне із запропонованих запитань, щоб почати наш чат

close

Awesome!

Completion rate improved to 2.94

book
Змінювані та Незмінювані Типи Даних

Understanding the difference between mutable and immutable data types is crucial. Mutable data types can be changed after their creation, while immutable data types cannot be modified once created.

Незмінювані типи даних, як випливає з назви, не можуть бути змінені після їх створення.
На відміну від них, змінювані типи даних - це об'єкти, які можна змінювати після їх створення.

1234567
# Define a variable `var1` with an initial value var1 = 40 print(var1) # output: 40 # Change the value of `var1` var1 = 50 print(var1) # output: 50
copy
Завдання

Swipe to start coding

Imagine you are managing a budget for a small project. Initially, your available budget is set to $100. However, you receive an additional funding of $50. Update the value of the project_budget variable to reflect the total available budget.

Once you've completed this task, click the button below the code to check your solution.

Рішення

Switch to desktopПерейдіть на комп'ютер для реальної практикиПродовжуйте з того місця, де ви зупинились, використовуючи один з наведених нижче варіантів
Все було зрозуміло?

Як ми можемо покращити це?

Дякуємо за ваш відгук!

close

Awesome!

Completion rate improved to 2.94

Свайпніть щоб показати меню

some-alt