<jupyter_start><jupyter_text>*   Smallest multiple 2520 is the smallest number that can be divided by each of the numbers from 1 to 10 without any remainder.What is the smallest positive number that is evenly divisible by all of the numbers from 1 to 20?<jupyter_code>if __name__ == '__main__':
    assert divisor(2520) == True
def divisor(number):
    return True

if __name__ == '__main__':
    assert divisor(2520) == True<jupyter_output><empty_output><jupyter_text>Before to try to coding, I guess is better if I set the algorithm first:<jupyter_code>"""
l = [2, 3, ..., 10]
while i < f:
    if f % l[i] == 0:
        i = i + 1
    else:
        return False
return True
"""
def divisor(number):
    if number % 2 == 0 and number % 3 == 0 \
    and number % 4 == 0 and number % 5 == 0 \
    and number % 6 == 0 and number % 7 == 0 \
    and number % 8 == 0 and number % 9 == 0 \
    and number % 10 == 0:
        return True
    return False

if __name__ == '__main__':
    assert divisor(2520) == True
    assert divisor(500) == False
    assert divisor(900) == False
    assert divisor(2000) == False
"""I must to refactor"""
x = range(2, 11)
x = list(x)
print(x)
def divisor(number):
    x = range(2, 11)
    x = list(x)
    i = 2
    while i < len(x) + 1:
        if number % i == 0:
            i = i + 1
        else:
            return False
    return True

if __name__ == '__main__':
    assert divisor(2520) == True
    assert divisor(500) == False
    assert divisor(900) == False
    assert divisor(2000) == False
"""I developed a code which I can check is the input number is divisible with all numbers
inside the inverval 2 <= x < 11"""<jupyter_output><empty_output><jupyter_text>Now, I must to refactor and build a code where which return the divisible number with all numbers inside the interval, instead of to check.<jupyter_code>def divisor_interval():
    number = 1
    while divisor(number) == False:
        number = number + 1
    return number

def divisor(number):
    x = range(2, 11)
    x = list(x)
    i = 2
    while i < len(x) + 1:
        if number % i == 0:
            i = i + 1
        else:
            return False
    return True

if __name__ == '__main__':
    assert divisor(2520) == True
    assert divisor(500) == False
    assert divisor(900) == False
    assert divisor(2000) == False
divisor_interval()<jupyter_output><empty_output><jupyter_text>Nice!Now I must do the same, but with the new interval: 2 into 20.<jupyter_code>def divisor_interval2():
    number = 1
    while divisor2(number) == False:
        number = number + 1
    return number


def divisor2(number):
    x = range(2, 21)
    x = list(x)
    i = 2
    while i < len(x) + 1:
        if number % i == 0:
            i = i + 1
        else:
            return False
    return True


def divisor_interval():
    number = 1
    while divisor(number) == False:
        number = number + 1
    return number

def divisor(number):
    x = range(2, 11)
    x = list(x)
    i = 2
    while i < len(x) + 1:
        if number % i == 0:
            i = i + 1
        else:
            return False
    return True

if __name__ == '__main__':
    assert divisor(2520) == True
    assert divisor(500) == False
    assert divisor(900) == False
    assert divisor(2000) == False
divisor_interval2()
x = range(2, 21)
x = list(x)
print(x)
def divisor_interval2():
    number = 2520#because I know the number is larger than 2520
    while divisor2(number) == False:
        number = number + 1
    return number


def divisor2(number):
    x = range(2, 21)
    x = list(x)
    i = 2
    while i < len(x) + 1:
        if number % i == 0:
            i = i + 1
        else:
            return False
    return True

divisor_interval2()<jupyter_output><empty_output><jupyter_text>It works. But I must to make it in the right way, because it is delaying so much to response<jupyter_code>def divisor_interval2():
    number = 2520
    while divisor2(number) == False:
        number = number + 1
    return number


def divisor2(number):
    x = range(2, 21)
    x = list(x)
    i = 20#fix here
    while i  > 2:#fix here
        if number % i == 0:
            i = i - 1#and here
        else:
            return False
    return True
divisor_interval2()
"""I even can do it better"""
def divisor_interval2():
    number = 2520
    while divisor2(number) == False:
        number = number + 1
    return number


def divisor2(number):
    x = range(2, 21)
    x = list(x)
    i = 20
    while i  > 2:
        if number % i == 0:
            i = i - 1
        else:
            return False
    return True
divisor2(400)
def divisor_interval2():
    number = 2520
    while divisor2(number) == False:
        number = number + 2#changing here
    return number


def divisor2(number):
    x = range(2, 21)
    x = list(x)
    i = 20
    while i  > 2:
        if number % i == 0:
            i = i - 1
        else:
            return False
    return True
divisor_interval2()<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.10593643813711773, 'fraction_numerical': 0.044573256046372176, 'mean_word_length': 2.2556929082628496, 'pattern_counts': {'":': 0, '<': 29, '<?xml version=': 0, '>': 24, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '5', 'dir': 'jupyter-structured-clean-dedup', 'id': '141645', 'license': 'MIT', 'n_tokens_mistral': 1824, 'n_tokens_neox': 1602, 'n_words': 589, 'path': '5-Smallest multiple.ipynb', 'repo_name': 'vss-py/TDD-ProjectEuler', 'size': '5003'}