Last active
June 5, 2022 15:34
-
-
Save PushkraJ99/c1fa768bdfe32c64ea964d42c50fcf62 to your computer and use it in GitHub Desktop.
Palindrome 3
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #Palindrome using Python (Github:-PushkraJ99) | |
| 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("The number is Not a palindrome!") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment