Skip to content

Commit 94248b8

Browse files
authored
Fix typehints in project_euler/problem01 (TheAlgorithms#2891)
Squashed commit of the following: commit 6801d07 Author: Archaengel <[email protected]> Date: Mon Oct 5 16:40:10 2020 -0700 Fix typehints in project_euler/problem01 commit 29afc3a Author: Archaengel <[email protected]> Date: Mon Oct 5 15:06:34 2020 -0700 Add typehints and default argument for project_euler/problem_01
1 parent ded9099 commit 94248b8

File tree

7 files changed

+7
-7
lines changed

7 files changed

+7
-7
lines changed

Diff for: project_euler/problem_01/sol1.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"""
77

88

9-
def solution(n):
9+
def solution(n: int = 1000) -> int:
1010
"""Returns the sum of all the multiples of 3 or 5 below n.
1111
1212
>>> solution(3)

Diff for: project_euler/problem_01/sol2.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"""
77

88

9-
def solution(n):
9+
def solution(n: int = 1000) -> int:
1010
"""Returns the sum of all the multiples of 3 or 5 below n.
1111
1212
>>> solution(3)

Diff for: project_euler/problem_01/sol3.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"""
77

88

9-
def solution(n):
9+
def solution(n: int = 1000) -> int:
1010
"""
1111
This solution is based on the pattern that the successive numbers in the
1212
series follow: 0+3,+2,+1,+3,+1,+2,+3.

Diff for: project_euler/problem_01/sol4.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"""
77

88

9-
def solution(n):
9+
def solution(n: int = 1000) -> int:
1010
"""Returns the sum of all the multiples of 3 or 5 below n.
1111
1212
>>> solution(3)

Diff for: project_euler/problem_01/sol5.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
"""A straightforward pythonic solution using list comprehension"""
99

1010

11-
def solution(n):
11+
def solution(n: int = 1000) -> int:
1212
"""Returns the sum of all the multiples of 3 or 5 below n.
1313
1414
>>> solution(3)

Diff for: project_euler/problem_01/sol6.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"""
77

88

9-
def solution(n):
9+
def solution(n: int = 1000) -> int:
1010
"""Returns the sum of all the multiples of 3 or 5 below n.
1111
1212
>>> solution(3)

Diff for: project_euler/problem_01/sol7.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"""
77

88

9-
def solution(n):
9+
def solution(n: int = 1000) -> int:
1010
"""Returns the sum of all the multiples of 3 or 5 below n.
1111
1212
>>> solution(3)

0 commit comments

Comments
 (0)