From f0ec2502091a93739c064c704eb1e44c4242a8e0 Mon Sep 17 00:00:00 2001 From: Brenden Smith Date: Sun, 4 Apr 2021 02:04:18 -0500 Subject: [PATCH 1/2] Add skeleton for exercise 10 --- python/exercises/10_summation_of_primes.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/python/exercises/10_summation_of_primes.py b/python/exercises/10_summation_of_primes.py index a416c04..ad8596b 100644 --- a/python/exercises/10_summation_of_primes.py +++ b/python/exercises/10_summation_of_primes.py @@ -3,14 +3,17 @@ import itertools from functools import reduce -# Description of the problem +# We need to find the sum of the primes below 2,000,000 +# The sum of the promes below 10 is 17 (2 + 3 + 5 + 7) class Solution: - def solution(param: type) -> returnType: + def solution(self, max_number: int) -> int: pass -input = [] -print(Solution().solution(input)) +# Boilerplate driver code +input1 = 10 +input2 = 2000000 +print(Solution().solution(input1)) From d4c29e08453394d70105d55fd3cf0320918ee236 Mon Sep 17 00:00:00 2001 From: Brenden Smith Date: Sun, 4 Apr 2021 13:57:27 -0500 Subject: [PATCH 2/2] Remove runner code to cleanup for testing. --- python/exercises/10_summation_of_primes.py | 6 ------ 1 file changed, 6 deletions(-) diff --git a/python/exercises/10_summation_of_primes.py b/python/exercises/10_summation_of_primes.py index ad8596b..bd7ad90 100644 --- a/python/exercises/10_summation_of_primes.py +++ b/python/exercises/10_summation_of_primes.py @@ -11,9 +11,3 @@ class Solution: def solution(self, max_number: int) -> int: pass - - -# Boilerplate driver code -input1 = 10 -input2 = 2000000 -print(Solution().solution(input1))