diff options
Diffstat (limited to 'palindrome.py')
-rw-r--r-- | palindrome.py | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/palindrome.py b/palindrome.py index be3fe79..ed2a779 100644 --- a/palindrome.py +++ b/palindrome.py @@ -1,12 +1,9 @@ -import PIL -import math - # Problem 4 - Palindrome Products def isPalindrome(number): numchar = str(number) - middle = len(numchar)/2 + middle = int(len(numchar)/2) face = numchar[:middle] ref = numchar[len(numchar):middle-1:-1] if(face == ref): @@ -37,7 +34,3 @@ print(answer) print("The factors are: " + str(findProduct(answer))) #x = input("Type a palindromic number: ") -# if(isPalindrome(x)): -# print "The factors are: " + str(findProduct(x)) -# else: -# print "not a palindrome" |