Skip to content

chore: fix coding style with default value #3009

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

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
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
4 changes: 2 additions & 2 deletions project_euler/problem_08/sol1.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
71636269561882670428252483600823257530420752963450"""


def solution(n):
def solution(n: str = N):
"""Find the thirteen adjacent digits in the 1000-digit number n that have
the greatest product and returns it.

Expand All @@ -68,4 +68,4 @@ def solution(n):


if __name__ == "__main__":
print(solution(N))
print(solution())
4 changes: 2 additions & 2 deletions project_euler/problem_08/sol2.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
)


def solution(n):
def solution(n=str(N)):
"""Find the thirteen adjacent digits in the 1000-digit number n that have
the greatest product and returns it.

Expand All @@ -69,4 +69,4 @@ def solution(n):


if __name__ == "__main__":
print(solution(str(N)))
print(solution())
4 changes: 2 additions & 2 deletions project_euler/problem_08/sol3.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ def streval(s: str) -> int:
return ret


def solution(n: str) -> int:
def solution(n: str = N) -> int:
"""Find the thirteen adjacent digits in the 1000-digit number n that have
the greatest product and returns it.

Expand All @@ -79,4 +79,4 @@ def solution(n: str) -> int:


if __name__ == "__main__":
print(solution(N))
print(solution())