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

Зміст курсу

Типи даних у Python

Типи даних у Python

1. Знайомство з числами в Python
2. Істина чи брехня?
3. Рядки
4. Поєднання всіх тем разом

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.

Завдання
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.

Рішення

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

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

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

Секція 1. Розділ 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.

Завдання
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.

Рішення

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

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

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

Секція 1. Розділ 5
Switch to desktopПерейдіть на комп'ютер для реальної практикиПродовжуйте з того місця, де ви зупинились, використовуючи один з наведених нижче варіантів
We're sorry to hear that something went wrong. What happened?
some-alt