Цілі Числа
Можливо, ви звикли вказувати числа такими способами, як
1,000,000
(з комами) або
1 000 000
(з пробілами);
однак Python цього не зрозуміє.😢 Ці формати зрозумілі для людини, але не для комп'ютера, тому правильним буде 1000000
без ком та пробілів.
Завдання
Swipe to start coding
Here is the distance from the sun to the Earth in miles: var1 = 91,400,000
. And here is the distance from the Earth to the moon: var2 = 238 855
. You need to adjust these number formats to be compatible with Python.
- Rewrite the values of these two distances so they are recognizable by Python.
- Output these variables by including their names in
print
function calls.
Рішення
Все було зрозуміло?
Дякуємо за ваш відгук!
Секція 1. Розділ 3