Create codespell.yml (#1698)

* fixup! Format Python code with psf/black push

* Create codespell.yml

* fixup! Format Python code with psf/black push
This commit is contained in:
Christian Clauss
2020-01-18 13:24:33 +01:00
committed by GitHub
parent c01d178798
commit bfcb95b297
78 changed files with 206 additions and 188 deletions

View File

@@ -19,7 +19,7 @@ def solution(n):
>>> solution(40000)
39893
"""
# fetchs the next number
# fetches the next number
for number in range(n - 1, 10000, -1):
# converts number into string.

View File

@@ -30,5 +30,5 @@ def digitsum(s: str) -> int:
if __name__ == "__main__":
count = sum(digitsum(str(i)) for i in range(1000,1000000))
count = sum(digitsum(str(i)) for i in range(1000, 1000000))
print(count) # --> 443839

View File

@@ -2,7 +2,7 @@
Sum of digits sequence
Problem 551
Let a(0), a(1),... be an interger sequence defined by:
Let a(0), a(1),... be an integer sequence defined by:
a(0) = 1
for n >= 1, a(n) is the sum of the digits of all preceding terms
@@ -33,7 +33,7 @@ def next_term(a_i, k, i, n):
k -- k when terms are written in the from a(i) = b*10^k + c.
Term are calulcated until c > 10^k or the n-th term is reached.
i -- position along the sequence
n -- term to caluclate up to if k is large enough
n -- term to calculate up to if k is large enough
Return: a tuple of difference between ending term and starting term, and
the number of terms calculated. ex. if starting term is a_0=1, and