[Project Euler] Fix code style for multiple problems (#3094)

* Fix code style for Project Euler problems:

- 13, 17, 21
- Default args
- Type hints
- File path

* Fix code style for multiple problems

* Made suggested changes
This commit is contained in:
Dhruv
2020-10-10 21:23:17 +05:30
committed by GitHub
parent c961d5541f
commit 501a2ff430
11 changed files with 89 additions and 67 deletions

View File

@@ -1,4 +1,6 @@
"""
Problem 46: https://projecteuler.net/problem=46
It was proposed by Christian Goldbach that every odd composite number can be
written as the sum of a prime and twice a square.
@@ -84,5 +86,10 @@ def compute_nums(n: int) -> list[int]:
return list_nums
def solution() -> int:
"""Return the solution to the problem"""
return compute_nums(1)[0]
if __name__ == "__main__":
print(f"{compute_nums(1) = }")
print(f"{solution() = }")