We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5419a32 commit 4716f65Copy full SHA for 4716f65
palindrome.py
@@ -0,0 +1,11 @@
1
+num=int(input("Enter a number:"))
2
+temp=num
3
+rev=0
4
+while(num>0):
5
+ dig=num%10
6
+ rev=rev*10+dig
7
+ num=num//10
8
+if(temp==rev):
9
+ print("The number is palindrome!")
10
+else:
11
+ print("Not a palindrome!")
0 commit comments