0
In python how do I print multiple strings in one line with multiple integers?
I'm trying to write a program that reads an integer number and prints its previous and next numbers. Examples of inputs and outputs are below. Example input 179 Example output The next number for the number 179 is 180 The previous number for the number 179 is 178
2 Answers
+ 3
number=int(input()
)
prev=number-1
next=number+1
print(f"The prev number for the number {number} is {prev}")
print(f"The next number for the number {number} is {next}")