From 20bc571dc655d0774529dd1f5517342e934809d5 Mon Sep 17 00:00:00 2001 From: mjf Date: Tue, 4 Feb 2020 14:52:21 -0500 Subject: cleanup more mistakes, add more c code --- palindrome.py | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) (limited to 'palindrome.py') 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" -- cgit v1.2.3