The problem is, we are given a number and we need to write a python program to check whether the given number is a palindrome or not.

Palindrome Number: A number is said to be a palindrome if its reverse is equal to itself.

Palindrome number in Python

Steps to Check Palindrome Number in Python

  • Take a number as input num.
  • Find the reverse of the number rev
  • Compare rev with the original number.
  • If both are equal then the number is Palindrome else it is not.

Check Whether a number is a Palindrome in Python

Output

Python program to check Palindrome

Find all the Magic Numbers in the interval in Python

To print all palindrome numbers in the given range we will run the above code for each number. Therefore we will write the code which verifies the palindrome number into a function and will call that function from the loop.

Output

Palindrome numbers between 1 to 100

Comment below if you have any suggestions.

Leave a Reply

Close Menu