Computer Science, asked by sandeepobc, 3 months ago

Write a python program for any two the following

1) To input a number from the user and display its successor, predecessor and its square​

Answers

Answered by Anonymous
5

Answer:

Hello,

Explanation:

#program to input a number and find it's successor, predecessor and its square​.

n=int(input("enter the number"))

pr=n-1

sr=n+1

square=n**2

print("the predecessor of",n,"is :",pr)

print("the successor of",n,"is :",sr)

print("the square of",n,"is :",square)

_________________________________

Hope it helps you

Please mark it brainliest

@ItzSnowySecret07

Similar questions