PYTHON

Write a Python program to check whether a number is palindrome or not.

num = int(input("Enter the number :- ")) temp = num rev = 0 while temp !=0: rem = temp % 10 rev = (rev * 10)+rem temp = temp //10 if rev == num: print("The number is Palindrom.... ",num) else: print("The number is not Palindrom.... ",num)

OUTPUT….

Leave a Reply

Your email address will not be published. Required fields are marked *

sign up!

We’ll send you the hottest deals straight to your inbox so you’re always in on the best-kept software secrets.