Example #1
0
def computeConsecutivePrimes(a, b):
		x = 0
		eval = x*x + a*x + b
		while eval > 0 and isPrime(eval):
			eval = x*x + a*x + b
			x += 1
		return x
Example #2
0
def get_sum_of_primes_below(limit):
    primes = [2]
    number = 2
    while number < limit:
        number += 1
        if isPrime(number):
            primes.append(number)
    print sum(primes)