<jupyter_start><jupyter_text>the following code is of a function which gives the sum of all primes below a number where number is given as parameter num<jupyter_code>@njit
def tellprime(z):
    if z == 1:
        return False
    elif z in [2,3]:
        return True
    elif z%2==0:
        return False
    elif z%3==0:
        return False
    else:
        for i in range(4, int(z**(.5))+1):
            if i%6 in [1,5]:
                if z%i==0:
                    return False
        return True

    
    
%time tellprime(4)
# this function is valid for numbers above 4
def sum_of_primes_below(num):
    answer = 5
    for i in range(4, num):
        if tellprime(i):
            answer += i
    return answer
%time sum_of_primes_below(2000000)<jupyter_output>Wall time: 1.44 s
{'fraction_non_alphanumeric': 0.09021601016518424, 'fraction_numerical': 0.035578144853875476, 'mean_word_length': 2.078125, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 4, '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': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '365526', 'license': 'MIT', 'n_tokens_mistral': 276, 'n_tokens_neox': 257, 'n_words': 91, 'path': 'Lokesh Tiwari/Project_Euler_problem_10.ipynb', 'repo_name': 'medhatiwari/Project-Euler-solutions', 'size': '787'}