mirror of
https://github.com/TheAlgorithms/Python.git
synced 2024-11-27 15:01:08 +00:00
Coding style with default argument for project_euler problem 27 (#3020)
* add default arguments and problem url * Update and rename problem_27_sol1.py to sol1.py Co-authored-by: Dhruv <dhruvmanila@gmail.com>
This commit is contained in:
parent
899870be4c
commit
e24248524a
|
@ -1,4 +1,9 @@
|
|||
"""
|
||||
Project Euler Problem 27
|
||||
https://projecteuler.net/problem=27
|
||||
|
||||
Problem Statement:
|
||||
|
||||
Euler discovered the remarkable quadratic formula:
|
||||
n2 + n + 41
|
||||
It turns out that the formula will produce 40 primes for the consecutive values
|
||||
|
@ -37,7 +42,7 @@ def is_prime(k: int) -> bool:
|
|||
return True
|
||||
|
||||
|
||||
def solution(a_limit: int, b_limit: int) -> int:
|
||||
def solution(a_limit: int = 1000, b_limit: int = 1000) -> int:
|
||||
"""
|
||||
>>> solution(1000, 1000)
|
||||
-59231
|
Loading…
Reference in New Issue
Block a user