Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
float and int | Common data types
Learn Python from Scratch
course content

Зміст курсу

Learn Python from Scratch

Learn Python from Scratch

1. The basics
2. Arithmetic operations
3. Common data types
4. Conditional statements
5. Other data types
6. Loops
7. Functions

float and int

Let's continue the last task.

Завдання

Consider the variables from the previous chapter, and new variable velocity (in miles per hour). Your tasks are:

  1. Find out number of hours that needed to pass the distance (dist_mi) with constant speed (velocity). Save this result within time_h variable, and output the result.
  2. Calculate how many full days this trip will take using time_h variable. Save this number within time_days variable, and output the result. Note, that there you need to round up this number. You can do it by converting to integer, and adding 1 day.

Завдання

Consider the variables from the previous chapter, and new variable velocity (in miles per hour). Your tasks are:

  1. Find out number of hours that needed to pass the distance (dist_mi) with constant speed (velocity). Save this result within time_h variable, and output the result.
  2. Calculate how many full days this trip will take using time_h variable. Save this number within time_days variable, and output the result. Note, that there you need to round up this number. You can do it by converting to integer, and adding 1 day.

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

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

Секція 3. Розділ 3
toggle bottom row

float and int

Let's continue the last task.

Завдання

Consider the variables from the previous chapter, and new variable velocity (in miles per hour). Your tasks are:

  1. Find out number of hours that needed to pass the distance (dist_mi) with constant speed (velocity). Save this result within time_h variable, and output the result.
  2. Calculate how many full days this trip will take using time_h variable. Save this number within time_days variable, and output the result. Note, that there you need to round up this number. You can do it by converting to integer, and adding 1 day.

Завдання

Consider the variables from the previous chapter, and new variable velocity (in miles per hour). Your tasks are:

  1. Find out number of hours that needed to pass the distance (dist_mi) with constant speed (velocity). Save this result within time_h variable, and output the result.
  2. Calculate how many full days this trip will take using time_h variable. Save this number within time_days variable, and output the result. Note, that there you need to round up this number. You can do it by converting to integer, and adding 1 day.

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

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

Секція 3. Розділ 3
toggle bottom row

float and int

Let's continue the last task.

Завдання

Consider the variables from the previous chapter, and new variable velocity (in miles per hour). Your tasks are:

  1. Find out number of hours that needed to pass the distance (dist_mi) with constant speed (velocity). Save this result within time_h variable, and output the result.
  2. Calculate how many full days this trip will take using time_h variable. Save this number within time_days variable, and output the result. Note, that there you need to round up this number. You can do it by converting to integer, and adding 1 day.

Завдання

Consider the variables from the previous chapter, and new variable velocity (in miles per hour). Your tasks are:

  1. Find out number of hours that needed to pass the distance (dist_mi) with constant speed (velocity). Save this result within time_h variable, and output the result.
  2. Calculate how many full days this trip will take using time_h variable. Save this number within time_days variable, and output the result. Note, that there you need to round up this number. You can do it by converting to integer, and adding 1 day.

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

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

Let's continue the last task.

Завдання

Consider the variables from the previous chapter, and new variable velocity (in miles per hour). Your tasks are:

  1. Find out number of hours that needed to pass the distance (dist_mi) with constant speed (velocity). Save this result within time_h variable, and output the result.
  2. Calculate how many full days this trip will take using time_h variable. Save this number within time_days variable, and output the result. Note, that there you need to round up this number. You can do it by converting to integer, and adding 1 day.

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