Given no. palindrome or not | python | IDLE SHELL |

Published: 11 February 2023
on channel: We Are Programmers
77
3

Program Explanation
1. User must first enter the value of the integer and store it in a variable.
2. The value of the integer is then stored in another temporary variable.
3. The while loop is used and the last digit of the number is obtained by using the modulus operator.
4. The last digit is then stored at the one’s place, second last at the ten’s place and so on.
5. The last digit is then removed by truly dividing the number with 10.
6. This loop terminates when the value of the number is 0.
7. The reverse of the number is then compared with the integer value stored in the temporary variable.
8. If both are equal, the number is a palindrome.
9. If both aren’t equal, the number isn’t a palindrome.
10. The final result is then printed.


On this page of the site you can watch the video online Given no. palindrome or not | python | IDLE SHELL | with a duration of hours minute second in good quality, which was uploaded by the user We Are Programmers 11 February 2023, share the link with friends and acquaintances, this video has already been watched 77 times on youtube and it was liked by 3 viewers. Enjoy your viewing!