13 Program that takes a number and checks whether it is a Palindrome or not using python

Program:

num = int(input("Enter any number:"))

onum = num

rnum = 0

while num > 0:

    rem = num % 10

    rnum = (rnum * 10) + rem

    num = num // 10



if rnum == onum:

    print("Number is Palindrome")

else:

    print("Number is not Palindrome")


Output:



Previous
Next Post »