Solve problem "Previous and next" online - Learn Python 3 - Snakify

Problem «Previous and next» (Medium)


Statement

Write a program that reads an integer number and prints its previous and next numbers. See the examples below. Remember that you can convert the numbers to strings using the function str.

In all the problems input the data using input() and print the result using print().



Saved solutions

Tests

Input Correct answer Result
179
The next number for the number 179 is 180.
The previous number for the number 179 is 178.
0
The next number for the number 0 is 1.
The previous number for the number 0 is -1.
2718281828904590
The next number for the number 2718281828904590 is 2718281828904591.
The previous number for the number 2718281828904590 is 2718281828904589.