Header Ads

How to Check Number is Palindrome or Not in Python Program


What is Palindrome Number?
Palindrome Number is that number if the reverse of that number is equal to Original number then we say this number is palindrome.
Python, palindrome, reverse, palindrome number, reverse number, check palindrome number, find palindrome number, check number is palindrome , check number is palindrome or not in python

For Example:
Original Number:  12421 
Reverse: 12421
12421 is Palindrome Number

Example: Code Program

num = int(input("Enter Number:"))
temp = num
rev =
0
while num > 0:
    rem =
int(num%10)
    rev = rev *
10 + rem
    num =
int(num/10)
if temp == rev:
   
print(temp," is Palindrome")
else:
   
print(temp, " is Not Palindrome")



Python, palindrome, reverse, palindrome number, reverse number, check palindrome number, find palindrome number, check number is palindrome , check number is palindrome or not in python


Java Program
Java Program to Check the Number is Palindrome or Not

No comments

Powered by Blogger.