
1 Тренировочная задача 4 (1 балл) Петя считает, сколько шагов он прошёл за день. Он записал
статистику за несколько дней. Петя Выходил каждый день, а потом Простудился и остался дома. В этот день в записях ПОЯВИЛСЯ первый HОЛЬ. Посчитай, Сколько всего шагов прошёл Петя до того, как простуДИЛСЯ. Пожалуйста срочно

Ответы на вопрос

Ответ:
без уточнения как и в каком формате подаются входные данные тебе поможет только господь
п. с.
result = 0
while 1:
number = int(input())
if not number:
break
result += number
print(result)
Объяснение:



Task Description
In this task, we need to calculate the total number of steps that Petya took before he got sick and stayed at home. Petya recorded his statistics for several days, and on the day he got sick, the first zero appeared in his records. We need to find the sum of all the steps before that day.Solution
To calculate the total number of steps Petya took before getting sick, we need to sum up the steps recorded on each day until the first zero appears in his records.Let's assume that Petya's step records are as follows: - Day 1: 5000 steps - Day 2: 6000 steps - Day 3: 4000 steps - Day 4: 0 steps (Petya got sick)
To find the total number of steps before Petya got sick, we sum up the steps recorded on each day until the first zero appears. In this case, the total number of steps would be 5000 + 6000 + 4000 = 15000 steps.
Therefore, Petya took a total of 15000 steps before he got sick and stayed at home.
Please note that the provided example is for illustration purposes only. To calculate the actual total number of steps, we would need the specific step records for each day.
Let me know if there is anything else I can help you with!


Похожие вопросы


Топ вопросов за вчера в категории Информатика







Последние заданные вопросы в категории Информатика
-
Математика
-
Литература
-
Алгебра
-
Русский язык
-
Геометрия
-
Английский язык
-
Химия
-
Физика
-
Биология
-
Другие предметы
-
История
-
Обществознание
-
Окружающий мир
-
География
-
Українська мова
-
Информатика
-
Українська література
-
Қазақ тiлi
-
Экономика
-
Музыка
-
Право
-
Беларуская мова
-
Французский язык
-
Немецкий язык
-
МХК
-
ОБЖ
-
Психология
-
Физкультура и спорт
-
Астрономия
-
Кыргыз тили
-
Оʻzbek tili