Skip to content

Commit 1dc25c5

Browse files
nstoikdhruvmanila
andauthored
Coding style with default argument for project_euler problem 27 (TheAlgorithms#3020)
* add default arguments and problem url * Update and rename problem_27_sol1.py to sol1.py Co-authored-by: Dhruv <[email protected]>
1 parent d1f48d4 commit 1dc25c5

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

Diff for: project_euler/problem_27/problem_27_sol1.py renamed to project_euler/problem_27/sol1.py

+6-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
11
"""
2+
Project Euler Problem 27
3+
https://projecteuler.net/problem=27
4+
5+
Problem Statement:
6+
27
Euler discovered the remarkable quadratic formula:
38
n2 + n + 41
49
It turns out that the formula will produce 40 primes for the consecutive values
@@ -37,7 +42,7 @@ def is_prime(k: int) -> bool:
3742
return True
3843

3944

40-
def solution(a_limit: int, b_limit: int) -> int:
45+
def solution(a_limit: int = 1000, b_limit: int = 1000) -> int:
4146
"""
4247
>>> solution(1000, 1000)
4348
-59231

0 commit comments

Comments
 (0)