@@ -0,0 +1,1568 @@
+__author__ = 'tmarsha1'%0D%0A%0D%0A%22%22%22 find largest palindrome for the product of 2 three digit numbers%0D%0A    (100-999) or (100%5E2 - 999%5E2)%0D%0A    Answer is 913 * 993 = 906609%0D%0A%22%22%22%0D%0A%0D%0Aimport re%0D%0A%0D%0Aclass Word(object):%0D%0A    def __init__(self, values):%0D%0A        concat = %22%22%0D%0A        for value in values:%0D%0A            concat = concat + self.format_value(value)%0D%0A        self.concatenated_word = concat%0D%0A%0D%0A    def format_value(self, value):%0D%0A        value = str(value).lower()%0D%0A        value = re.sub(%22%5B%5EA-Za-z0-9%5D%22, %22%22, value)%0D%0A        return value%0D%0A%0D%0A    def is_palindrome(self):%0D%0A        return self.concatenated_word == self.concatenated_word%5B::-1%5D%0D%0A%0D%0A    def to_str(self):%0D%0A        return self.concatenated_word%0D%0A%0D%0A%0D%0Adef is_palindrome(value):%0D%0A    result = False%0D%0A    value = str(value)%0D%0A    if value == value%5B::-1%5D:%0D%0A        result = True%0D%0A    return result%0D%0A%0D%0A%0D%0Adef compare_palindromes(word1, word2):%0D%0A    result = word1%0D%0A    if int(word1.to_str()) %3C int(word2.to_str()):%0D%0A        result = word2%0D%0A    return result%0D%0A%0D%0A%0D%0Adef brittle_palindrome_solution(lower_bounds, upper_bounds):%0D%0A    max_palindrome = Word(%220%22)%0D%0A%0D%0A    for first_item in range(lower_bounds, upper_bounds):%0D%0A        for second_item in range(lower_bounds, upper_bounds):%0D%0A            product = first_item * second_item%0D%0A            word = Word(str(product))%0D%0A            if word.is_palindrome():%0D%0A                max_palindrome = compare_palindromes(max_palindrome, word)%0D%0A%0D%0A    return max_palindrome%0D%0A%0D%0A%0D%0Aif __name__ == '__main__':%0D%0A    print(%22palindrome: %25s%22 %25 brittle_palindrome_solution(100, 1000).to_str())%0D%0A

Add homework solution for tmarsha1.