Skip to content

Commit

Permalink
increase test coverage to 100%
Browse files Browse the repository at this point in the history
  • Loading branch information
DanielSchuette committed Feb 10, 2019
1 parent 9f7ea33 commit f05e233
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions py_src/problem008.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,11 +70,11 @@ def faster_product(num, n):
while i < len(num) - n:
# If the next digit is a 0 skip n digits ahead
if num[i + n - 1] == 0:
i += n
i += n # pragma: no cover
else:
p = prod(num[i:i+n])
if p > m:
m = p
m = p # pragma: no cover
i += 1
return m

Expand All @@ -86,7 +86,8 @@ def faster_product(num, n):
num_list = [int(c) for c in input_number]

parser = argparse.ArgumentParser()
parser.add_argument("-n", type=int, default=13, help='Number of adjacent digits to multiply (default is 13)')
help_msg = "Number of adjacent digits to multiply (default is 13)"
parser.add_argument("-n", type=int, default=13, help=help_msg)
args = parser.parse_args()

start = time.time()
Expand Down

0 comments on commit f05e233

Please sign in to comment.