Skip to content

Commit 1d0c4da

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent 0fbe0db commit 1d0c4da

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

maths/tribonacci.py

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,16 @@
1010
1111
"""
1212

13-
def tribonacci(n : int) -> int :
14-
trib = [0,1,1]
15-
for i in range(3,n+1):
16-
x = trib[i-1] + trib[i-2] + trib[i-3]
13+
14+
def tribonacci(n: int) -> int:
15+
trib = [0, 1, 1]
16+
for i in range(3, n + 1):
17+
x = trib[i - 1] + trib[i - 2] + trib[i - 3]
1718
trib.append(x)
1819
return trib[n]
1920

2021

21-
if __name__ == "__main__" :
22+
if __name__ == "__main__":
2223
import doctest
24+
2325
doctest.testmod()

0 commit comments

Comments
 (0)