Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Aprenda Complicated Math | Conhecendo os números em Python
Tipos de Dados em Python
course content

Conteúdo do Curso

Tipos de Dados em Python

Tipos de Dados em Python

1. Conhecendo os números em Python
2. Verdadeiro ou falso?
3. Strings
4. Reunindo todos os tópicos

book
Complicated Math

This section contains intriguing information; I trust you will find it engaging. You may have encountered mathematical operations such as // or %. In this section, we will delve into their explanations.

The operation // is called integer part division. It assists in determining how many whole instances of the right-hand number can be accommodated within the left-hand number. A common application of this operation is in scenarios where we wish to calculate the number of identical items we can purchase. For example, if we possess 38 dollars and intend to purchase multiple bottles of water, each priced at 7 dollars, we can calculate 38 // 7, yielding a result of 5. Thus, we can purchase 5 complete bottles.

The second operation, denoted as % and called the remainder, serves a similar purpose. In practical terms, the remainder can be likened to the concept of change. To illustrate this, let's revisit the bottles example. If we determine that with 38 dollars, we can purchase 5 bottles of water, the remainder reveals the amount of change remaining after we acquire the maximum possible quantity of items. In the same scenario, our change is calculated as 38 % 7, resulting in 3. Consequently, we have spent 35 dollars and retained 3 dollars as a change.

Tarefa
test

Swipe to begin your solution

Imagine that you are a student at school and you have to solve 10 math tasks. You’ve noticed that the average time to handle each task is 7 minutes; however, you have 60 minutes total.

  1. Calculate how many tasks you can manage and assign the result to the completed variable.
  2. Calculate the number of minutes left and assign the result to the variable minutes.

Complete the task using the // and % operations, one operation for one task.

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 5
toggle bottom row

book
Complicated Math

This section contains intriguing information; I trust you will find it engaging. You may have encountered mathematical operations such as // or %. In this section, we will delve into their explanations.

The operation // is called integer part division. It assists in determining how many whole instances of the right-hand number can be accommodated within the left-hand number. A common application of this operation is in scenarios where we wish to calculate the number of identical items we can purchase. For example, if we possess 38 dollars and intend to purchase multiple bottles of water, each priced at 7 dollars, we can calculate 38 // 7, yielding a result of 5. Thus, we can purchase 5 complete bottles.

The second operation, denoted as % and called the remainder, serves a similar purpose. In practical terms, the remainder can be likened to the concept of change. To illustrate this, let's revisit the bottles example. If we determine that with 38 dollars, we can purchase 5 bottles of water, the remainder reveals the amount of change remaining after we acquire the maximum possible quantity of items. In the same scenario, our change is calculated as 38 % 7, resulting in 3. Consequently, we have spent 35 dollars and retained 3 dollars as a change.

Tarefa
test

Swipe to begin your solution

Imagine that you are a student at school and you have to solve 10 math tasks. You’ve noticed that the average time to handle each task is 7 minutes; however, you have 60 minutes total.

  1. Calculate how many tasks you can manage and assign the result to the completed variable.
  2. Calculate the number of minutes left and assign the result to the variable minutes.

Complete the task using the // and % operations, one operation for one task.

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 5
Switch to desktopMude para o desktop para praticar no mundo realContinue de onde você está usando uma das opções abaixo
We're sorry to hear that something went wrong. What happened?
some-alt