Предмет: Информатика,
автор: laptevplaton
Напишите программу, которая считывает целое число и выводит текст, аналогичный приведенному в примере. Пробелы, знаки препинания, заглавные и строчные буквы важны!
Входные данные
Вводится целое число.
Выходные данные
Выведите ответ на задачу.
Пример
Входные данные:
179
Выходные данные:
The next number for the number 179 is 180 .
The previous number for the number 179 is 178 .
Ответы
Автор ответа:
10
x = int(input())
print('The next number for the number', x, 'is', x + 1, '.')
print('The previous number for the number', x, 'is', x - 1, '.')
Ввод:
179
Вывод:
The next number for the number 179 is 180 .
The previous number for the number 179 is 178 .
itsgest:
как
Correct output:
The next number for the number 179 is 180 .
The previous number for the number 179 is 178 .
Your code output:
The next number for the number 179 is 180 .
The previous number for the number 179 is 178 .
The next number for the number 179 is 180 .
The previous number for the number 179 is 178 .
Your code output:
The next number for the number 179 is 180 .
The previous number for the number 179 is 178 .
один в в один
А у тебя нету других вариантов?
в ошибке еще написано "Test input: 179"
мне кажется что комп должен сам ввести инпут
напиши
x = int(input())
print('The next number for the number', x, 'is', x + 1, '.')
print('The previous number for the number', x, 'is', x - 1, '.')
print('The next number for the number', x, 'is', x + 1, '.')
print('The previous number for the number', x, 'is', x - 1, '.')
а не
x = 179
print('The next number for the number', x, 'is', x + 1, '.')
print('The previous number for the number', x, 'is', x - 1, '.')
x = 179
print('The next number for the number', x, 'is', x + 1, '.')
print('The previous number for the number', x, 'is', x - 1, '.')
Все правильно! Спасибо огромное!
Похожие вопросы
Предмет: Русский язык,
автор: полька42
Предмет: Українська мова,
автор: bronskajal
Предмет: Русский язык,
автор: bekanas
Предмет: Қазақ тiлi,
автор: Аноним
Предмет: Математика,
автор: Еёлка1кк