Finding the next Palindrome
Hello, here's a quick post I'm making for a simple program. There will likely be another as my professor is currently making me do more basic programs at this point instead of a more major project like the calculator. This programs does one task: when given a number, it will find the next palindrome after the number. You can find it here on github . It does some other tasks as well such as validating if the input was a number and making sure the number can be turned into an integer. The finding of the next palindrome is done by checking the first half of the number and comparing its reverse to the latter half of the number. If the reversed first half is larger than the latter half, the output will just be the first half combined with the latter half being the reversed first half. In odd length numbers, the middle number is increased by 1. If the reversed first half is smaller than or equal to the latter half, the output will be the first half plus 1 and the rever