Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Aprenda Mutável ou Imutável? | Conhecendo os números em Python
Tipos de Dados em Python

Deslize para mostrar o menu

book
Mutável ou Imutável?

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.

Os tipos de dados imutáveis, como o próprio nome indica, não podem ser alterados depois de criados. Já os tipos de dados mutáveis são objetos que podem ser modificados após a sua criação.

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
Tarefa

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.

Solução

Switch to desktopMude para o desktop para praticar no mundo realContinue de onde você está usando uma das opções abaixo
Tudo estava claro?

Como podemos melhorá-lo?

Obrigado pelo seu feedback!

Seção 1. Capítulo 2
Sentimos muito que algo saiu errado. O que aconteceu?

Pergunte à IA

expand
ChatGPT

Pergunte o que quiser ou experimente uma das perguntas sugeridas para iniciar nosso bate-papo

book
Mutável ou Imutável?

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.

Os tipos de dados imutáveis, como o próprio nome indica, não podem ser alterados depois de criados. Já os tipos de dados mutáveis são objetos que podem ser modificados após a sua criação.

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
Tarefa

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.

Solução

Switch to desktopMude para o desktop para praticar no mundo realContinue de onde você está usando uma das opções abaixo
Tudo estava claro?

Como podemos melhorá-lo?

Obrigado pelo seu feedback!

Seção 1. Capítulo 2
Switch to desktopMude para o desktop para praticar no mundo realContinue de onde você está usando uma das opções abaixo
Sentimos muito que algo saiu errado. O que aconteceu?
some-alt