Skip to content

Hacktoberfest 2020 - coding style with default argument for project_euler problem 27 #3020

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Oct 8, 2020
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion project_euler/problem_27/problem_27_sol1.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
"""
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
Expand Down Expand Up @@ -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
Expand Down