Thursday, 14 May 2015

Python program to check whether a number is Palindrome or not


This is a Python program which checks whether a number is palindrome or not .
Generally a number is said to be a palindrome number if its reverse is same as the original number .

For Example : 121 is a palindrome as its reverse is also 121 where as , 231 is not a palindrome as its reverse is 132 .





PROGRAM :
num = int(input('Enter any number : '))
if str(num) == str(num)[::-1]:
    print("Given number is a PALINDROME number")
else:
    print("Given number is NOT a palindrome number")


OUTPUT : 
Python - Palindorme or not

Python - Palindorme or not



Similar Programs : 
C program to check whether a number is Palindrome or not
Cpp program to check whether a number is Palindrome or not
Java program to check whether a number is Palindrome or not