- 1

To check whether the number is palindrome or not and return y or n accordingly

3rd Nov 2020, 2:50 PM
Om Sharma
Om Sharma - avatar
9 Answers
+ 1
hint: *no need to convert str *what is palindrome? hm? *forward backward... got it?
3rd Nov 2020, 4:18 PM
Shadoff
Shadoff - avatar
+ 1
Many of this community CAN solve this O-N-E... But they don't want. there is difference between want and cant We can but dont want You want but cant Cabish?
3rd Nov 2020, 4:31 PM
Shadoff
Shadoff - avatar
0
Homework? Where is your attempt?
3rd Nov 2020, 3:04 PM
Jayakrishna 🇼🇳
0
num = int(input("Enter a number: ")) def palindrome(num): temp = n rev = 0 while (n > 0): digit = n % 10 rev= rev*10+dig n=n//10 if (temp==rev): return "yes" else: return "no" print(num,"\nis an palindrome number ") print(palindrome(num))
3rd Nov 2020, 3:54 PM
Om Sharma
Om Sharma - avatar
0
I have tried but this is not working
3rd Nov 2020, 3:54 PM
Om Sharma
Om Sharma - avatar
0
Even i am confused in this pls let me know if anyone can solve this one..
3rd Nov 2020, 4:24 PM
Dark Knight
Dark Knight - avatar
0
Oh ohk thats so sad😞😞
3rd Nov 2020, 4:33 PM
Dark Knight
Dark Knight - avatar
0
num = int(input("Enter a number: ")) def palindrome(n): temp = n rev = 0 while (n > 0): digit = n % 10 rev= rev*10+dig n=n//10 if (temp==rev): return "yes" else: return "no" print(num,"\nis an palindrome number ") print(palindrome(num)) #You need to understand code each part first..
4th Nov 2020, 12:16 PM
Jayakrishna 🇼🇳
0
Do a little modify to satisfy your need. https://code.sololearn.com/c18Ltdc8It25/?ref=app
22nd Feb 2021, 9:13 AM
Sonam Tashi