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:
Nelson Stoik 2020-10-08 05:23:00 -06:00 committed by GitHub
parent 899870be4c
commit e24248524a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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