DS160123 Palindrome code

Date:- 6/4/2023

palindrome number

num=int(input(“Enter a number:”))
temp=num
rev=0
while(num>0):
dig=num%10
rev=rev*10+dig
num=num//10
if(temp==rev):
print(“The number is palindrome!”)
else:
print(“Not a palindrome!”)

2 Likes

@sms18680

Well done, keep going

1 Like