@@ -0,0 +1,994 @@
+%22%22%22%0A%5Bref.href%5D https://projecteuler.net/problem=10%0A%0ASummation of primes.%0A%0AThe sum of the primes below 10 is 2 + 3 + 5 + 7 = 17.%0A%0AFind the sum of all the primes below two million.%0A%0A%22%22%22%0A%0Adef IsPrime(n):%0A    if n & 1:%0A        lim = int(n ** 0.5)%0A        m = 3%0A        while m %3C= lim:%0A            if n %25 m == 0:%0A                return False%0A            m += 2%0A        return True%0A    else:%0A        return n == 2%0A%0Adef PrimeGenerator(nthPrime = None):%0A    if nthPrime == None:%0A        cond = lambda c: True%0A    else:%0A        cond = lambda c: c %3C nthPrime%0A    n = 1%0A    if cond(n) == False:%0A        return    %0A    yield 2    %0A    candidate = 3%0A    while cond(n):%0A        if IsPrime(candidate):%0A            n += 1%0A            yield candidate%0A        candidate += 2%0A%0Aprimegen = PrimeGenerator()%0AupperBound = 2000000%0Aprimesum = 0%0Afor prime in primegen:%0A    if prime %3E= upperBound:%0A        break%0A    primesum += prime%0A%0Aprint %22The sum of all primes below %22 + str(upperBound) + %22 is %22 + str(primesum) + %22.%22%0A

Create problem10.py