python program to check palindrome
Answers
Answered by
4
n=int(input("Enter number:"))
temp=n
rev=0
while(n>0):
dig=n%10
rev=rev*10+dig
n=n//10
if(temp==rev):
print("The number is a palindrome!")
else:
print("The number isn't a palindrome!")
please mark this answer as brainlist
follow me i'll follow you thank you
Answered by
2
Question:-
Write a python program to check palindrome.
Program:-
n=int(input("Enter a number: "))
x, s=n, 0
while n!=0:
s=s*10+n%10
n=n//10
if (s==x):
print("Number is palindrome. ")
else:
print("Number is not palindrome. ")
Similar questions
Accountancy,
5 months ago
Math,
5 months ago
CBSE BOARD XII,
1 year ago
Science,
1 year ago
English,
1 year ago
English,
1 year ago