Simple Python Scripts
Scripts for simple Python programs
Sunday, 2 October 2016
To check number is palindrome or not
n=int(input('enter no:'))
rev=0;t=n
while(n!=0):
r=n%10
n=n//10
rev=rev*10+r
if(t==rev):
print('the number is palindrome')
else:
print('no palindrome')
No comments:
Post a Comment
Newer Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment