<jupyter_start><jupyter_text>*  Problem 9 - Special Pythagorean tripletA Pythagorean triplet is a set of three natural numbers, a < b < c, for which, a² + b² = c²For example, 3² + 4² = 9 + 16 = 25 = 5².There exists exactly one Pythagorean triplet for which a + b + c = 1000.Find the product abc. Pythagorean numbers:*  a	b	c* 3	4	5* 5	12	13* 7	24	25* 9	40	41* 11	60	61* 13	84	85* 15	112	113* 17	144	145* 19	180	181* 21	220	221* 23	264	265* 25	312	313* 27	364	365* 29	420	421* 31	480	481But, if I look for these numbers, I am seeing that is impossible to get a triplet which a + b + c = 1000. So, I must to leave this pattern.  Dividing the problem in many parts, I imagine the first one is to check this sum(a + b + c)<jupyter_code>def check(a, b, c):
    if a + b + c == 1000:
        return True
    else:
        return False
if __name__ == '__main__':
    assert check(1000, 0, 0) == True
    assert check(900, 50, 50) == True
    assert check(333, 333, 334) == True
    assert check(0,0,0) == False
    assert check(1000.0, 0.0, 0.0) == True
    assert check(-100, 80, 9) == False<jupyter_output><empty_output><jupyter_text>Now, I am using the Euclid's Formula to get a pythagorean triplet.* a = (m²) - (n²)* b = 2mn* c = (m²) + (n²)* m > n > 0<jupyter_code>for i in range(1, 1000):
    for j in range(1, 1000):
        if i > j:
            a = (i ** 2) - (j ** 2)
            b = 2 * i * j
            c = (i ** 2) + (j ** 2)
            if (a + b + c) == 1000:
                print(a,b,c)
        else:
            pass
for i in range(1, 1000):
    for j in range(1, 1000):
        if i > j:
            a = (i ** 2) - (j ** 2)
            b = 2 * i * j
            c = (i ** 2) + (j ** 2)
            if (a + b + c) < 100:
                print(a,b,c)
        
"""a = (m²) - (n²)
b = 2mn
c = (m²) + (n²)
m > n > 0"""
for i in range(1, 100):
    for j in range(1,100):
        a = (i**2) - (j**2)
        b = 2*i*j
        c = (i**2) + (j**2)
        print(a,b,c)
#to avoid the negative value, I must to define i > j
for i in range(1, 100):
    for j in range(1,100):
        if i > j:
            a = (i**2) - (j**2)
            b = 2*i*j
            c = (i**2) + (j**2)
            print(a,b,c)
#and now I am loocking for check the assertion: a + b + c = 1000
for i in range(1, 100):
    for j in range(1,100):
        if i > j:
            a = (i**2) - (j**2)
            b = 2*i*j
            c = (i**2) + (j**2)
            if (a + b + c) == 1000:
                print(a,b,c)
#and print the product
for i in range(1, 100):
    for j in range(1,100):
        if i > j:
            a = (i**2) - (j**2)
            b = 2*i*j
            c = (i**2) + (j**2)
            if (a + b + c) == 1000:
                print(a*b*c)<jupyter_output>31875000
{'fraction_non_alphanumeric': 0.15342763873775844, 'fraction_numerical': 0.10010881392818281, 'mean_word_length': 1.7388282025819266, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 18, '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': '2', 'dir': 'jupyter-structured-clean-dedup', 'id': '237413', 'license': 'MIT', 'n_tokens_mistral': 1300, 'n_tokens_neox': 1083, 'n_words': 403, 'path': '9-Special Pythagorean triplet(correto).ipynb', 'repo_name': 'victor-s-santos/TDD-Project-Euler', 'size': '2757'}