Python Program:

- To check number is Palindrome or not

Example:

User Input: 1221

Output: Palindrome Number

num=int(input("Enter your number : "))
reverse = 0
num2=num
while num!=0 :
  reverse=reverse*10+num%10
  num=int(num/10)
if num2==reverse : 
  print("Palindrome Number")
else :
  print("Not a Palindrome Number")

Output:

  Enter Your number : 12321
  Palindrome Number
Program
number

You must know first,

Palindrome Number : if a number & reverse of it are equal then the number is Palindrome number

Example :

Number: 121 & its Reverse = 121 . so it's Palindrome
Number: 123 & its Reverse = 321 . so it's NOT a Palindrome

#Save the original number
num2=num

#reverse the number
while num!=0 :
  reverse=reverse*10+num%10
  num=int(num/10)

#check for the Palindrome
if num2==reverse :
Concept

Coming Soon !

Quick
Tutorial

Quote

In order to carry a positive action, we must develop here a positive vision.