write a python program to read a number from the user and check whether it is a palindrome or not
pls notice it is number not a string
I will mark brainliest to whom the answer soon.
Answers
Answered by
1
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!")
MARK ME BRAINLIEST
Answered by
1
Here's your answer:)
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!")
Similar questions
English,
4 months ago
Math,
4 months ago
Physics,
4 months ago
Social Sciences,
9 months ago
Computer Science,
9 months ago
English,
1 year ago
Economy,
1 year ago
Math,
1 year ago