From 378282951b47fa0d6832d0038aa276ab76f024f0 Mon Sep 17 00:00:00 2001 From: Bob Date: Mon, 5 Oct 2020 16:27:31 +0200 Subject: [PATCH 1/2] Fixed coding style problem 33 fixes: #2786 --- project_euler/problem_33/sol1.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/project_euler/problem_33/sol1.py b/project_euler/problem_33/sol1.py index 73a49023ae41..5c43d1207560 100644 --- a/project_euler/problem_33/sol1.py +++ b/project_euler/problem_33/sol1.py @@ -23,17 +23,17 @@ def isDigitCancelling(num, den): return True -def solve(digit_len: int) -> str: +def solution(digit_len: int) -> str: """ - >>> solve(2) + >>> solution(2) '16/64 , 19/95 , 26/65 , 49/98' - >>> solve(3) + >>> solution(3) '16/64 , 19/95 , 26/65 , 49/98' - >>> solve(4) + >>> solution(4) '16/64 , 19/95 , 26/65 , 49/98' - >>> solve(0) + >>> solution(0) '' - >>> solve(5) + >>> solution(5) '16/64 , 19/95 , 26/65 , 49/98' """ solutions = [] @@ -52,4 +52,4 @@ def solve(digit_len: int) -> str: if __name__ == "__main__": - print(solve(2)) + print(solution(2)) From d2677508463e9dbd6b7710f34390a2357d50bcc6 Mon Sep 17 00:00:00 2001 From: Bob Date: Thu, 8 Oct 2020 14:36:55 +0200 Subject: [PATCH 2/2] Added default value for digit_len --- project_euler/problem_33/sol1.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project_euler/problem_33/sol1.py b/project_euler/problem_33/sol1.py index 5c43d1207560..ba8c8f9f344e 100644 --- a/project_euler/problem_33/sol1.py +++ b/project_euler/problem_33/sol1.py @@ -23,7 +23,7 @@ def isDigitCancelling(num, den): return True -def solution(digit_len: int) -> str: +def solution(digit_len: int = 2) -> str: """ >>> solution(2) '16/64 , 19/95 , 26/65 , 49/98'