Program to check for a Palindrome Number



What is a Palindrome Number?

A palindrome number is a number that remains the same when its digits are reversed. In other words, it has reflectional symmetry across a vertical axis.


#
program to accept a number from the user and check if it is palindrome or not

a=int(input("Enter a number: "))

f=a

t=0

while f>0:

    d=f%10

    t=t*10+d

    f=f//10

if a==t:

    print("Palindrome number")

else:

    print("Not a Palindrome number")


Comments

Popular Posts