<jupyter_start><jupyter_text>Problem 10The sum of the primes below 10 is 2 + 3 + 5 + 7 = 17.Find the sum of all the primes below two million.  Solution 10<jupyter_code>def test_primality(n):
    if n<4: return True
    limit = int(n**0.5)+1
    for i in range(2,limit+1):
        if n%i == 0: return False
    return True
def sum_primes(n):
    s = 0
    for i in range(2,n+1):
        if test_primality(i):
            s += i
    return s        
sum_primes(10)
sum_primes(1000000)
sum_primes(2000000)<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.10714285714285714, 'fraction_numerical': 0.07142857142857142, 'mean_word_length': 2.9191176470588234, 'pattern_counts': {'":': 0, '<': 6, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '86207', 'license': 'MIT', 'n_tokens_mistral': 229, 'n_tokens_neox': 199, 'n_words': 60, 'path': 'solutions/S0010.ipynb', 'repo_name': 'trabdlkarim/UrkelOs', 'size': '532'}