def solution2(): total = 5 counter = 5 while counter <= LIMIT: if is_prime(counter): total += counter counter += 2 if counter <= LIMIT and is_prime(counter): total += counter counter += 4 return total
def solution(): number = 1 counter = 2 # two is prime while (counter <= LIMIT): number += 2 if is_prime(number): counter += 1 return number
def solution(): total_sum = 0 for n in xrange(2, LIMIT): if is_prime(n): total_sum += n return total_sum