def is_palindrome(number):
    """
    Returns true if a number is a palindrome.
    """
    number_string = str(number)
    number_length = len(number_string)
    
    # set the default cutpoints
    cutpoint = number_length / 2
    first_partition = number_string[:cutpoint]
    second_partition = number_string[cutpoint:]
    
    # if odd need to cut the middle number
    # out of the partitions
    if number_length % 2 != 0:
        second_partition = number_string[cutpoint + 1:]
    
    # do the partitions match?
    if first_partition == second_partition[::-1]:
        # have a palindrome!
        return True

    # no palindrome
    return False