From 1879caa1dd80cb11dd62403663917ad4bf7cc68e Mon Sep 17 00:00:00 2001 From: Charles Date: Sun, 11 Aug 2019 22:41:34 +0200 Subject: rename all file with 3 zero padding --- python/010-summation_of_primes.py | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 python/010-summation_of_primes.py (limited to 'python/010-summation_of_primes.py') diff --git a/python/010-summation_of_primes.py b/python/010-summation_of_primes.py new file mode 100644 index 0000000..e637c9c --- /dev/null +++ b/python/010-summation_of_primes.py @@ -0,0 +1,10 @@ +from helper.prime import is_prime + +prime_numbers = [] +for num in range(2, 2_000_000): + if is_prime(num, prime_numbers): + prime_numbers.append(num) + num += 1 + +summation = sum(prime_numbers) +print(summation) -- cgit